LonnieJohnson
Programmer
I am new to curosrs and have one that contains three fields. I wnat to use one of the fields to do something to each row.
How do I identify just one field in a curor? Here is my code.
ProDev, Builders of Affordable Software Applications
Visit me at ==>
May God bless you beyond your imagination!!!
How do I identify just one field in a curor? Here is my code.
Code:
DECLARE CURSOR1 CURSOR
FOR select CSNBR, LNAME, FNAME from vw_DischargesForClosedFiles
OPEN CURSOR1
FETCH CURSOR1
DECLARE @MSG AS VARCHAR(100)
While @@Fetch_Status =0
BEGIN
--I want to use the CSNBR as a variable in some other code to add a record to another table.
Fetch Next from CURSOR1
End
CLOSE CURSOR1
DEALLOCATE CURSOR1
ProDev, Builders of Affordable Software Applications
Visit me at ==>
May God bless you beyond your imagination!!!