RE: creating a table from a cursor

RE: creating a table from a cursor

 

  

Well, well, well!
It's Holman Shawn! Hehe. How have you been? Partyyyy! Hehe.


CREATE OR REPLACE PROCEDURE CREATE_EMP2
IS
str long;

s_ERR VARCHAR2(500);

BEGIN
STR := 'CREATE TABLE EMP22 AS
SELECT * FROM EMP';

execute immediate str;

s_ERR := 'SUCCESS';
EXCEPTION
WHEN OTHERS
THEN
ROLLBACK;
s_ERR := ' ERROR: ' || SQLERRM;
END;
/

EXEC CREATE_EMP2;

SELECT * FROM EMP2;





Please take a few minutes to provide feedback on the quality of service you received from our staff. The Department of Education values your feedback as a customer. Commissioner of Education Jeanine Blomberg is committed to continuously assessing and improving the level and quality of services provided to you.Simply use the link below. Thank you in advance for completing the survey.


http://data.fldoe.org/cs/default.cfm?staff=Ed.[Email address protected]




-----Original Message-----
From: Holman Shawn [IWD]
[mailto:oracledba-ezmlmshield-x90610838.[Email address protected]
Sent: Friday, August 31, 2007 8:56 AM
To: LazyDBA Discussion
Subject: creating a table from a cursor

Is there a way to create a table from a cursor in PL/SQL short of
creating the table and inserting each record individually in Oracle 10g?



Shawn Holman

Information Technology Specialist III

Iowa Workforce Development

Employment Statistics Bureau

1000 E. Grand Ave.

Des Moines, IA 50319

Phone: 515-281-6785

FAX: 515-281-8203





An Equal Opportunity Employer/Program

Auxiliary aids and services are available upon request for individuals
with disabilities.


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html

Oracle LazyDBA home page