I'm trying to learn how to build a multi insert statement into oracle. The below inserts work one at a time, but when I put them together and try to execute, I receive an error (in PL/SQL).
One error is below, which seems to reference the ending ";".
ORA-00911: Invalid Character
However, if I remove the ";" on each insert and just put "Commit;" at the end, I get an error stating SQL not ended
ORA-00933 SQL command not properly ended. If I put "Commit;" at the end while keeping the ";" after each insert, I still get the ORA-00911 error.
I tried wrapping them in a Begin End statement, which worked, but when I put a few hundred in, another error occured about the program being to long.
If I could get any pointers would really appreciate it. Also, I'm trying to understand the fastest way of writing the INSERT statements against the server. The reason I am using Insert statements is that this is for a small project to move access data. I know there are other tools, but I wanted to try to see what I could first using Insert statements.
Thanks,
Joel Seguin
Sr Systems Analyst
One error is below, which seems to reference the ending ";".
ORA-00911: Invalid Character
However, if I remove the ";" on each insert and just put "Commit;" at the end, I get an error stating SQL not ended
ORA-00933 SQL command not properly ended. If I put "Commit;" at the end while keeping the ";" after each insert, I still get the ORA-00911 error.
I tried wrapping them in a Begin End statement, which worked, but when I put a few hundred in, another error occured about the program being to long.
If I could get any pointers would really appreciate it. Also, I'm trying to understand the fastest way of writing the INSERT statements against the server. The reason I am using Insert statements is that this is for a small project to move access data. I know there are other tools, but I wanted to try to see what I could first using Insert statements.
Code:
INSERT /*+ append */ INTO UWTBL_COUNTY_FACTORS VALUES('AR','OUC','OUACHITA',99,0.89,'Y','N',' ','01-JAN-1900','31-DEC-9999');
INSERT /*+ append */ INTO UWTBL_COUNTY_FACTORS VALUES('AR','OUC','OUACHITA',100,1.00,'Y','N',' ','01-JAN-1900','31-DEC-9999');
INSERT /*+ append */ INTO UWTBL_COUNTY_FACTORS VALUES('AR','OUC','OUACHITA',251,0.89,'Y','N',' ','01-JAN-1900','31-DEC-9999');
INSERT /*+ append */ INTO UWTBL_COUNTY_FACTORS VALUES('AR','OUC','OUACHITA',252,1.00,'Y','N',' ','01-JAN-1900','31-DEC-9999');
Thanks,
Joel Seguin
Sr Systems Analyst