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.