Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How to call a SQL scalar function from PowerShell

$
0
0

Re: How to call a SQL scalar function from PowerShell

I have a v2 PS script and want to call a SQL scalar-value function which returns a string. I have searched and searched but am unable to find a working example. Anyone know how this is done? Currently I am using the .NET method SqlConnection for my queries.

BTW - I am not looking for a invoke-sqlcmd solution. I have tried to get invoke-sqlcmd working in my 8 or so different test environments (different sql, powershell, .net, os, etc)  and have been unsuccessful. This has soured me on my chances of getting it to work in a single install at a client's site.

Thanks.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>