Porting of Oracle cursor structure in T-SQL - 12-22-2004 , 10:35 AM
I have a problem with a porting of a cursor structure in Oracle in SQL
I need the same implementation of the functionalities.
The Oracle cursor structure is:
CURSOR SELECTOR_PHY_DISK IS
WHERE DBS_PHYSICAL_DISKS.PHYSICAL_DISK_ID = DISK_ID_P
then I have an INSERT code, some like this:
But I've no idea how to write the same in T-SQL (maybe of varchar
type, but then I can't take the structure in the INSERT).
Have anyone ideas?
Re: Porting of Oracle cursor structure in T-SQL - 12-22-2004 , 10:59 AM
Depending on what you have to do between the fetch and the insert, you will
either have to declare a variable for each column or you may be able to use
INSERT INTO NewTable ( col1, col2... )
For examples of a cursor see books online "Declare Cursor" topic.
"Gigio" <zambetti (AT) inwind (DOT) it> wrote