cursor for loop

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: karthika Jegatheesan via SQLMonster.com (forum_at_SQLMonster.com)
Date: 01/13/05


Date: Thu, 13 Jan 2005 04:58:32 GMT

cursor c is select * from emp;
for emp_rec IN c loop
  dbms_output.put_line(emp_rec.ecode,emp_rec.empname,emp_rec.dept);
end loop;

Similar to cursor for loop in oracle is there any corresponding for loop in SQL Server

-- 
Message posted via http://www.sqlmonster.com


Relevant Pages

  • Re: More on closing Oracle ref cursors
    ... I would be very grateful if you could find out for me if the same is true in your Oracle 8i database. ... loop in the _do_proc method. ... cursor handle, but I can't see what would be doing that. ... IF bind_param_inout creates a reference from the pl/sql statement ...
    (perl.dbi.users)
  • RE: Oracle cursor help
    ... rids dbms_utility.uncl_array; ... where <your where clause> ... Subject: Re: Oracle cursor help ... exit the loop: */ ...
    (perl.dbi.users)
  • Re: whats a "reasonable" length of time to keep a cursor open?
    ... an image processing work dispatcher that runs continuously. ... loop forever: ... for each row in the cursor: ... Oracle would return the previously mentioned ...
    (comp.databases.oracle.misc)
  • Command object stops prematurely without error?
    ... However, when run via the ADO Command object, the outer loop Applications ... Declare cApps CURSOR for Select ApplicationID from UCM_Applications ...
    (microsoft.public.data.ado)
  • Re: Calling a SP inside a cursor loop..
    ... every loop iteration of the cursor. ... Fetch next From EffectiveDate_Cursor Into @FLD1,@FLD2 ... and If the Fetch stmt is below the begin Stmt, the loop iterations are ... the proper way to program a cursor loop is: ...
    (comp.databases.ms-sqlserver)