hehi<br><br>does somebody know a website where there are examples for cursor programming in sql server 6.5???<br>its urgend...i didnt found something<br><br>thx in advance<br><br>cazeno
Hi,<br><br>what kind of cursor do u want to write.<br><br>the general structure for the cursor is<br><br>CREATE <cursorname> CURSOR FOR<br> <your select query><br><br>OPEN <cursorname><br>FETCH FIRST FROM <cursorname> INTO <field list specefied in the select query><br><br>WHILE @@FETCH_STAUS <> -1 /* For checking that you have not crossed the end of the cursor*/<br>BEGIN<br> /* your processing based on the rows given by the sever*/<br><br> FETCH NEXT FROM <cursorname> INTO <field list specefied in the select query><br>END<br>CLOSE <cursorname><br>DEALLOCATE <cursorname><br><br><br>Hope this helps.<br><br><br>Nikhil<br>(<A HREF="mailto:nikhilmehrotra@mailmetoday.com">nikhilmehrotra@mailmetoday.com</A>)<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.