Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's the equivalent of VFP's Scan...Endscan in SQL?
Message
From
18/04/2007 14:11:28
John Baird
Coatesville, Pennsylvania, United States
 
 
To
18/04/2007 13:38:08
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
01217180
Message ID:
01217418
Views:
20
Using cursors makes sense when they are needed. You can speed them up by using the FAST FORWARD parameters which only allows forward only reading of the cursor.

We use them a couple of times in our projects.


>Thanks for the info, Simplicio
>
>>Robert,
>>
>>Use CURSOR in T-SQL
>>
>>
>>
>>DECLARE Employee_Cursor CURSOR FOR
>>SELECT EmployeeID, Title FROM AdventureWorks.HumanResources.Employee;
>>OPEN Employee_Cursor;
>>FETCH NEXT FROM Employee_Cursor;
>>WHILE @@FETCH_STATUS = 0
>>   BEGIN
>>      FETCH NEXT FROM Employee_Cursor;
>>   END;
>>CLOSE Employee_Cursor;
>>DEALLOCATE Employee_Cursor;
>>GO
>>
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform