Jump to content

newbie trouble


tararan

Recommended Posts

Hi everybody! This is my first post here and after reading a few thread i might be here to stay. There are plenty of useful info and helpful people on this board. Glad to be here.Anywho, I'm very new to SQL and here's one of my problem right now. 1. I'm receiving an error everytime i try to insert more than one row at a time. for example:SQL> insert into customer (CustID, lastName) 2 values(123, 'bigs'), (124, 'tave');values(123, 'bigs'), (124, 'tave') *ERROR at line 2:ORA-00933: SQL command not properly ended

Link to comment
Share on other sites

From what I can tell Oracle does not support this.Here is an article explaining how to do this with PHP and Oracle. http://www.oracle.com/technology/pub/artic..._multirows.htmlAnother option is to cut and paste the query multiple times in a text file (changing the values of course) and save it as a .sql and use SQLPlus to load the query file.

Link to comment
Share on other sites

From what I can tell Oracle does not support this.Here is an article explaining how to do this with PHP and Oracle. http://www.oracle.com/technology/pub/artic..._multirows.htmlAnother option is to cut and paste the query multiple times in a text file (changing the values of course) and save it as a .sql and use SQLPlus to load the query file.
Sounds good, i just wanted to make sure i wasn't doing anything wrong. I knew i was following the right convention.if it's not too much trouble for yah, you think you can walk me through the saving a .sql and using sqlplus to load the query file.i've reading on it this morning on this text that i'm using and it's not very clear on its steps. i appreciate your help. sorry, i know i'm asking too much.
Link to comment
Share on other sites

no it is not too much :).oopen a text editor and enter this

insert into customer (CustID, lastName) values(123, 'bigs')insert into customer (CustID, lastName) values(124, 'tave');

then save the file as myinsert.sqlI am not sure, since it has been so long since I used SQLPlus, where you should save the file (I think you can just specify the path anyways)Then in SQLPlus

SQL>GET your_path/myinsert.sql;

Note it has been a long time since I have done this but I think this should work.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...