Home » SQL & PL/SQL » SQL & PL/SQL » run sql queries as a script (Oracle 9.2.0.1.0)
run sql queries as a script [message #378836] Fri, 02 January 2009 01:28 Go to next message
shaksing
Messages: 115
Registered: November 2008
Senior Member
Suppose i have number of insert queries and i want to run it as a sql script. so what changes do i need to make here.
INSERT INTO emp VALUES
(7369, 'SMITH', 'CLERK', 7902, 800, 20);
INSERT INTO EMP VALUES
(7499, 'ALLEN', 'SALESMAN', 7698, 1600, 30);
INSERT INTO EMP VALUES
(7521, 'WARD', 'SALESMAN', 7698, 1250, 30);
INSERT INTO EMP VALUES
(7566, 'JONES', 'MANAGER', 7839, 2975, 20);
INSERT INTO EMP VALUES
(7654, 'MARTIN', 'SALESMAN', 7698, 1250, 30);
INSERT INTO EMP VALUES
(7698, 'BLAKE', 'MANAGER', 7839, 2850, 30);
INSERT INTO EMP VALUES
(7782, 'CLARK', 'MANAGER', 7839, 2450, 10);
INSERT INTO EMP VALUES
(7788, 'SCOTT', 'ANALYST', 7566, 3000, 20);
INSERT INTO EMP VALUES
(7839, 'KING', 'PRESIDENT', NULL, 5000, 10);
INSERT INTO EMP VALUES
(7844, 'TURNER', 'SALESMAN', 7698, 1500, 30);

[Updated on: Fri, 02 January 2009 01:29]

Report message to a moderator

Re: run sql queries as a script [message #378839 is a reply to message #378836] Fri, 02 January 2009 01:31 Go to previous messageGo to next message
trivendra
Messages: 208
Registered: October 2007
Location: Noida, India
Senior Member
Hi,

Make a sql extension file , paste you script and
run on sqlplus

@filename.sql

Thanks
Trivendra
Re: run sql queries as a script [message #378842 is a reply to message #378836] Fri, 02 January 2009 01:32 Go to previous message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Nothing, put these in a file and call it.

Regards
Michel
Previous Topic: Count per Hour
Next Topic: PL/SQL: ORA-00984: column not allowed here
Goto Forum:
  


Current Time: Mon Dec 05 12:59:21 CST 2016

Total time taken to generate the page: 0.21456 seconds