Normal state for a cursor in T-sql, if I'm not mistaking.

This code returns the columns LastName, FirstName from a database in a very 
ineffective way.


----- Original Message ----- 
From: "Erwin Rommel Felix 2000A" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 04, 2004 11:42 AM
Subject: [AspClassicAnyQuestionIsOk] @@Fetch_Status


>
> Could someone explain what does @@Fetch_Status do.
>
> Sample Code:
> *******************************************
>
> DECLARE Employee_Cursor CURSOR FOR
> SELECT LastName, FirstName FROM
> Northwind.dbo.Employees
> 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
>
> *******************************************
> What does this code do? Thanks.
>
> =====
> Erwin Rommel Y. Felix
> Tel. 8410111 loc. 11430
> Mobile 09185980706
>
> "Never outshine the Master Chicker"
>
> 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to