Posted on 2007-02-08 14:17:59-08 by srobert
execute dynamic sql with stored procedure
Hi,
I want to execute some dynamic sql with stored procedure,
I bulid this dynamic sql, then execute

like:

declare @sql varchar(200)

set @sql='select ' + @fields + 'from ' + @table
exce @sql

but I want to get this execute result

how to do?

do I need use some temp table to store this data?

Thanks, Robert Snoog (softsea.com)
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.