June 16, 2004 at 6:23 am
I need to make a dynamic SQL query passed as a select
statement in cursor mode in MSSQl.
e.g
DECLARE cr CURSOR
FOR
EXEC('SELECT * FROM' + @tname)
As you can see I do not know the table name as the time
of creating this cursor(in an Stored Proc) which shall be
passed as a parameter.
Please suggest an alternative or any way to make this
work.
Any help would be appreciated
Thanks in Adv.
June 16, 2004 at 8:34 am
You will need to build the whole process dynamically including the cursor work.
June 16, 2004 at 9:21 pm
Can you give an example for this ?
June 17, 2004 at 6:32 am
Hurray!!!!
It works.....
Thanks a million
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply