Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Retrieve Data from an Cursor to a RECORD
How To Retrieve Data from an Cursor to a RECORD? - Oracle DBA FAQ - Working with Cursors in PL/SQL
✍: FYIcenter.com
If you have a cursor opened ready to use, you can also use the FETCH statement to retrieve data from the cursor into a RECORD variable as shown in the tutorial exercise below:
CREATE OR REPLACE PROCEDURE FYI_CENTER AS CURSOR t_list IS SELECT first_name, last_name FROM employees; TYPE name_rec IS RECORD ( f_name VARCHAR2(10), l_name VARCHAR2(10) ); n name_rec; BEGIN OPEN t_list; FETCH t_list INTO n; DBMS_OUTPUT.PUT_LINE('Name = ' || n.f_name || ' ' || n.l_name); FETCH t_list INTO n; DBMS_OUTPUT.PUT_LINE('Name = ' || n.f_name || ' ' || n.l_name); CLOSE t_list; END; / Name = Ellen Abel Name = Sundar Ande
2007-04-29, 4735👍, 0💬
Popular Posts:
How To Increment Dates by 1? - Oracle DBA FAQ - Understanding SQL Basics If you have a date, and you...
.NET INTERVIEW QUESTIONS - Can we use events with threading ? Yes, you can use events with thread; t...
How many types of validation controls are provided by ASP.NET ? There are six main types of validati...
What are the standard ways of parsing XML document? XML parser sits in between the XML document and ...
I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, ...