About 500,000 results
Open links in new tab
  1. sql - How to execute Table valued function - Stack Overflow

    If you want to use a field from the returned table in a local variable you can use the following: SELECT Top 1 @Name=[Name] from [dbo].FN('Some text') I have a similar problem in that I …

  2. How to execute function in SQL Server 2008 - Stack Overflow

    Jan 26, 2014 · how to call scalar function in sql server 2008 Each time, I try entering the Function using the syntax shown here in SQL Server Management Studio, or SSMS, to see the results, …

  3. SQL User Defined Function Within Select - Stack Overflow

    I have a user defined function in SQL called getBuisnessDays it takes @startdate and @enddate and returns the number of business days between the two dates. How can I call that function …

  4. sql - Execute Stored Procedure from a Function - Stack Overflow

    Also, it's not true that "If a function called a stored procedure, the function would become able to have side-effects" since SQL Server can prevent just those forbidden actions, as it does when …

  5. sql server - Execute WITH statement inside a function - Stack …

    Oct 31, 2012 · sql-server t-sql function asked Oct 31, 2012 at 19:19 gabsferreira 3,167 7 40 62

  6. t sql - Exec in a function SQL - Stack Overflow

    Mar 10, 2022 · A function cannot use EXEC, and a VIEW must be well defined; it's just a pseudo table defined by a SELECT. Ideally leave dynamic pivoting to your reporting layer.

  7. SQL Server execute (sp_executesql ) command in SQL function

    Sep 1, 2016 · You can't execute stored procedures inside a function. In this case you are trying to use the procedure sp_executesql inside the function and that is causing this issue.

  8. sql server - Return value from exec (@sql) - Stack Overflow

    Aug 12, 2015 · This works to retrieve the return value of a stored procedure, but not dynamic SQL.

  9. sql server - How to assign an exec result to a sql variable? - Stack ...

    Feb 11, 2010 · How do you assign the result of an exec call to a variable in SQL? I have a stored proc called up_GetBusinessDay, which returns a single date. Can you do something like this: …

  10. Calling SQL Defined function in C# - Stack Overflow

    The function name ExecuteScalar is frustratingly misleading when calling SQL Scalar Functions instead of SQL Store Procedures. But the behaviour does match the documentation