DECLARE curContacts IS SELECT FirstName, LastName FROM CONTACTS; vFormatName VARCHAR2(50); FUNCTION FormatName(vFirstName IN VARCHAR2, vLastName IN VARCHAR2) RETURN VARCHAR2 IS BEGIN RETURN vFirstName || ' ' || vLastName; END FormatName BEGIN FOR vContact IN curContacts LOOP vFormatName := FormatName(vContact.FirstName, vContact.LastName); INSERT INTO temp_table(char_col) VALUES(vFormatName); END LOOP; COMMIT; END;
Sunday, September 18, 2011
Local subprogram
at 4:34 AM
Labels: Oracle, Oracle Query, PL/SQL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment