Ora 00933 Error Insert
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site ora-00933 sql command not properly ended in oracle About Us Learn more about Stack Overflow the company Business Learn more about
Sql Command Not Properly Ended Insert Statement
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join ora 00933 sql command not properly ended in select query the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ORA-00933: SQL command not properly
Ora 00933 Sql Command Not Properly Ended Insert Multiple
ended in insert command up vote 0 down vote favorite The are many questions with this same title but I can't find an answer among those. What am I doing wrong? CREATE TABLE J (A integer) ; INSERT INTO J (A) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10) ; The create alone works. The problem is just the insert. I tried ora-00933 sql command not properly ended update in SQL Fiddle. oracle sqlfiddle share|improve this question asked Oct 12 '12 at 10:13 Clodoaldo Neto 48.1k869117 add a comment| 3 Answers 3 active oldest votes up vote 4 down vote accepted You can do it several ways (See SQL Fiddle with Demo): INSERT ALL INTO J (A) VALUES (1) INTO J (A) VALUES (2) INTO J (A) VALUES (3) INTO J (A) VALUES (4) INTO J (A) VALUES (5) INTO J (A) VALUES (6) INTO J (A) VALUES (7) INTO J (A) VALUES (8) SELECT * FROM dual ; Or (See SQL Fiddle With Demo): INSERT INTO J (A) select (1) from dual union all select (2) from dual union all select (3) from dual union all select (4) from dual union all select (5) from dual union all select (6) from dual union all select (7) from dual union all select (8) from dual union all select (9) from dual union all select (10) from dual Or even separate INSERT statements for each one: INSERT INTO J (A) VALUES (1); INSERT INTO J (A) VALUES (2); INSERT INTO J (A) VALUES (3); INSERT INTO J (A) VALUES (4); INSERT INTO J (A) VAL
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the
Ora-00933 Group By
company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions
Ora-00933 Sql Command Not Properly Ended In Java
Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million ora-00933 update programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ORA-00933: SQL command not properly ended (in simple insert statement) up vote 1 down vote favorite The following simple statement: http://stackoverflow.com/questions/12856875/ora-00933-sql-command-not-properly-ended-in-insert-command INSERT INTO mydb.inventory (itemID) VALUES (:itemID) WHERE playerID = :ID; Generates the following error: ORA-00933: SQL command not properly ended I have tried it without the semi-colon as well as with, but both give me the error. I am certain that the variables are being bound as well. All my Google searches show that this is usually caused by an ORDER BY clause, but clearly I don't have one. =P sql oracle plsql ora-00933 http://stackoverflow.com/questions/3181333/ora-00933-sql-command-not-properly-ended-in-simple-insert-statement share|improve this question edited Jul 6 '10 at 0:20 OMG Ponies 199k37361417 asked Jul 5 '10 at 17:56 rageingnonsense 38127 n/m. I just realized the folly in what I was trying to do. –rageingnonsense Jul 5 '10 at 18:06 add a comment| 3 Answers 3 active oldest votes up vote 3 down vote You only define a WHERE clause if you are populating the INSERT statement with a SELECT. IE: INSERT INTO mydb.inventory (itemID) SELECT :itemID FROM DUAL Otherwise, you specify the values as-is: INSERT INTO mydb.inventory (itemID) VALUES (:itemID) You specify a WHERE clause when you are updating an existing record: UPDATE mydb.inventory SET itemid = :itemid WHERE playerid = :ID share|improve this answer answered Jul 5 '10 at 18:05 OMG Ponies 199k37361417 add a comment| up vote 1 down vote An insert can not have a where clause. Perhaps you actually meant to update? share|improve this answer answered Jul 5 '10 at 18:04 Donnie 25.5k64471 1 An insert can have a WHERE clause if using a SELECT to populate the values. See my answer for details. –OMG Ponies Jul 5 '10 at 18:24 1 @OMG - Mentally then (to me) the where is on the sub-select. But, yes. –Donnie Jul 6 '10 at 12:12 add a comment| up vote 1 down vot
? Ask a question, help others, and get answers from the community Discussions Start a thread and discuss today's topics with top experts Blogs Read the latest tech blogs written by experienced community members How do I solve the ORA-00933: http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-solve-the-ora-00933-sql-command-not-properly-ended-error-message/ SQL command not properly ended error message? ITKE 440495 pts. Tags: Thanks! We'll email youwhen http://dba.stackexchange.com/questions/54523/why-does-oracle-still-not-support-multi-row-insert relevant content isadded and updated. Following Follow ORA Thanks! We'll email youwhen relevant content isadded and updated. Following Follow Oracle Database For the past few weeks, I've been using an OLEDB provider for ADO.NET connecting to an Oracle database. Currently in my loop, I'm doing this insert: insert into ps_tl_compleave_tbl values('2626899', 0, TO_DATE('01/01/2002', 'MM/DD/YYYY'), 'LTKN', 'LTKN', '52', sql command TO_DATE('01/01/2002', 'MM/DD/YYYY'), 16.000000, 24.000)insert into ps_tl_compleave_tbl values('4327142', 0, TO_DATE('03/23/2002', 'MM/DD/YYYY'), 'LTKN', 'LTKN', '51', TO_DATE('03/23/2002', 'MM/DD/YYYY'), 0.000000, 0.000) The first insert works but the second one is giving me an error: ORA-00933: SQL command not properly ended What should I do? Asked: September 24, 20148:00 PM Last updated: July 29, 20167:48 AM Related Questions AS/400 date format Getting the number of days between two dates in Oracle 11g Date Format Change to dd/mm/yyyy Date sql command not dd-mm-yyyy reversed to mm-dd-yyyy Date Time Error in VB Answer Wiki Last updated: September 25, 20143:58 PM GMT carlosdl80,565 pts. History Contributors Ordered by most recent carlosdl80,565 pts. Thanks. We'll let you know when a new response is added. If you are running more than one statement, you need to end each one with a semicolon (;), otherwise Oracle sees it as one single, but incorrect, command. Also, when you run more than one command, you might need to put them inside a BEGIN-END block. If you are running more than one statement, you need to end each one with a semicolon (;), otherwise Oracle sees it as one single, but incorrect, command.Also, when you run more than one command, you might need to put them inside a BEGIN-END block. Please enter an answer. Send me notifications when members answer or reply to this question. Register Hereor login if you are already a member E-mail User Name Password Forgot Password? By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy Improve This Answer Improve This Answer Processing your response... Discuss This Question:   There was an e
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Why does Oracle still not support Multi-Row insert? [closed] up vote 1 down vote favorite According to Wikipedia's article about INSERT in SQL, multi-row inserts are standard since SQL-92. Oracle (up to 11g at least) does not support this. Why? -- Valid insert into some_table (magic) values (42); -- Invalid insert into some_table (magic) values (42), (666); -- --> SQL Error: ORA-00933: SQL command not properly ended oracle share|improve this question edited Dec 5 '13 at 15:29 asked Dec 5 '13 at 15:02 cimnine 1094 closed as primarily opinion-based by a_horse_with_no_name, billinkc, RolandoMySQLDBA, bluefeet♦, Paul White♦ Dec 6 '13 at 3:57 Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question. 1 There's no a valid reason –Joe Taras Dec 5 '13 at 15:07 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote The plain answer is that not all RDBMSes support all of the various ANSI standards. Oracle just happens to not support this particular part of it. Oracle does however support INSERT ALL INTO. By the way, an example of insert into dual is terribad - You can break older versions of Oracle by doing an INSERT into DUAL. share|improve this answer an