0

I have function that have been colled in stored procedure. The function returns a table and have to fill another table. Maybe this queistion might be seems a little naive but im a newer in T-SQL. Thank you in advance.

1 Answer 1

1

Just use the function as though it was a table. You can:

Select * From dbo.MyFunction()

If you need to pass a value from the outer query into the UDF, use Cross Apply

like this:

 Select * From sys.dm_exec_requests ser 
 Cross Apply sys.dm_exec_sql_text(ser.sql_handle)
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.