Login    
 
 
 
 
Text/HTML
  
You are here :: Blogs Saturday, May 19, 2012

Search
Note: This uses the internal blog search engine. The Google search engine is also available at the top of the page.
  
Disclaimer

Please review the site disclaimer before downloading or using content found on this site

  
Categories
  
DEVSHED Blog
As always, I welcome your comments!
Jul 9

Written by: Steve Gray
7/9/2009 3:14 PM  RssIcon

This is the cursor template that I use... it works better than the default one, and allows BREAK and CONTINUE easily

DECLARE variables
 
DECLARE curName CURSOR LOCAL FAST_FORWARD FOR 
    select *
        from mytablename
 
OPEN curName
WHILE 1=1
BEGIN
    FETCH NEXT FROM curName INTO 
    if @@fetch_status <> 0 begin
        break
    end
 
 
END
CLOSE curName
DEALLOCATE curName
 

Tags:
Categories:
Location: Blogs Parent Separator DEVSHED Blogs Child Separator SQL
As always, I welcome your comments!
  
 
 
Home | Products | Blogs | Contact Us | Links | God's Plan
Privacy Statement | Terms Of Use
 
Copyright 2011 by Devshed.us