Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's the equivalent of VFP's Scan...Endscan in SQL?
Message
De
18/04/2007 14:11:28
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
À
18/04/2007 13:38:08
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
01217180
Message ID:
01217418
Vues:
21
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
>>
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform