Re: EXEC(sqlstatement) Resultset usage
From: Anith Sen (anith_at_bizdatasolutions.com)
Date: 11/12/04
- Next message: Aaron [SQL Server MVP]: "Re: CDOSYS Mail Problem: Win2003 Server?"
- Previous message: Tim S: "Re: dynamic sql question"
- In reply to: whornak: "EXEC(sqlstatement) Resultset usage"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 12 Nov 2004 12:13:28 -0600
>> How do I, from within the same stored procedure, use the result of a sql
>> statement after executing it using the EXEC() command?
If you are referring to the resultset, you can use a #temp table or use a
pass through query. If you are referring to the return value as with a
procedure, you can use a local variable. If you are referring to an value to
be returned as a result of an assignment you may want to use sp_ExecuteSQL
procedure. For details, refer to: KBA 262499 or check section "substituting
parameter values" under the topic "Using sp_ExecuteSQL" in SQL Server Books
Online.
-- Anith
- Next message: Aaron [SQL Server MVP]: "Re: CDOSYS Mail Problem: Win2003 Server?"
- Previous message: Tim S: "Re: dynamic sql question"
- In reply to: whornak: "EXEC(sqlstatement) Resultset usage"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|