Open the Cursors using TempTables

Open the Cursors using TempTables

Post by Suresh Ponra » Sat, 15 Nov 2003 07:50:19



Hi,

    I am creating temp table in runtime. The table name is different from
every execution. I want to open the cursor using that table name. Is it
possible to open the cursor using variable name for table names.

Please let me know ASAP.

Thanks and Regards
Suresh Ponraj

 
 
 

Open the Cursors using TempTables

Post by David Rot » Sat, 15 Nov 2003 08:51:05


Try this:






open curTest



        begin


        end
close curTest
deallocate curTest

BTW temptables are performance killers. You might use  a "normal" table holding temporary data instead.

HTH,
David Roth
MCT - MCDBA - MCSD.VS6 - MCSD.NET - MCSE
MSF Practitioner

 
 
 

Open the Cursors using TempTables

Post by Roji. P. Thoma » Sat, 15 Nov 2003 09:02:45


I am not sure whether u can use cursor.

But there will be definetely a non-cursor
solution there.


Quote:> Hi,

>     I am creating temp table in runtime. The table name is different from
> every execution. I want to open the cursor using that table name. Is it
> possible to open the cursor using variable name for table names.

> Please let me know ASAP.

> Thanks and Regards
> Suresh Ponraj