How can I use custom function in sql query to set value of some variable.
My function is:
function myFunc(par){return par;}
My SQL query is:
const string query =
@"
DECLARE @result varchar(100)
SET @result= myFunc(N'test')
INSERT[dbo].[TempTable] ([Name])
VALUES (@result)
";
dbo.myfunc(N'test').