is /* person`s list */ cursor c_persons is select a.id, a.email from factory.an_users a where nvl( a.active, 'N' ) = 'A' ; pc_persons c_persons%rowtype; sEmail varchar2( 4000 ); begin ... sEmail := ''; /* open cursor */ open c_persons; loop /* read every rows of the cursor */ fetch c_persons into pc_persons; exit when c_persons%notfound; /* -- action with row data.. */ if pc_persons.email is not null then sEmail := sEmail || pc_persons.email || ';'; end if; end loop; close c_persons; ... end;
Microsoft AX 2012, X++, C#, SQL server, SSRS, Java, JavaFX, Oracle, PL/SQL, Delphi - codes examples, step-by-step tutorials, experiences.
Monday, December 11, 2017
ORACLE - How make cursor and how go through its rows
With Oracle cursor you can read table data by SQL.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment