Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Updating table with values from cursor

Author  Topic 

Anna
Starting Member

20 Posts

Posted - 2001-03-15 : 11:15:47
I've created a cursor which selects * from a table name which is passed in as a parameter.
ie.
DECLARE new_cursor CURSOR for SELECT * from @table_name

I then want to use the recordset held in the cursor to update a table. If this were oracle I could get a particular field as new_cursor.field_name, but this doesn't seem to be allowed in SQLserver. Is the only way to get the separate fields from a recordset in a cursor to put them into explicitly declared variables, or is there another way?

Many thanks.

Anna
   

- Advertisement -