Oracle Prepare Error Ora-00933 Sql Command Not Properly Ended
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 About Us Learn more about Stack Overflow the company Business Learn more ora-00933 sql command not properly ended update about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users
Ora-00933 Sql Command Not Properly Ended Select
Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each sql command not properly ended join other. Join them; it only takes a minute: Sign up SQL Error: ORA-00933: SQL command not properly ended up vote 8 down vote favorite I am trying to update a record in oracle SQL developer by using Joins. ora-00933 sql command not properly ended group by Following is my query- UPDATE system_info set field_value = 'NewValue' FROM system_users users JOIN system_info info ON users.role_type = info.field_desc where users.user_name = 'uname' However, when I tried to execute it, I got following error- Error report: SQL Error: ORA-00933: SQL command not properly ended 00933. 00000 - "SQL command not properly ended" I tried removing JOINS UPDATE system_info info SET info.field_value = 'NewValue' FROM system_users users where users.user_name = 'uname' AND users.role_type = info.field_desc but still
Ora-00933 Sql Command Not Properly Ended In Java
having same error can anybody tell me the error reason and solution sql oracle share|improve this question edited Jan 20 '12 at 11:10 Mark Bannister 34.4k32450 asked Jan 20 '12 at 11:07 Microsoft DN 5,09132345 I think your sqlDevelepor executed the previous line. put a semi colon before and after your sql statement and try again –You Qi Jan 20 '12 at 11:11 I tried your solution, but not working for me –Microsoft DN Jan 20 '12 at 11:16 add a comment| 5 Answers 5 active oldest votes up vote 9 down vote accepted Oracle does not allow joining tables in an UPDATE statement. You need to rewrite your statement with a co-related sub-select Something like this: UPDATE system_info SET field_value = 'NewValue' WHERE field_desc IN (SELECT role_type FROM system_users WHERE user_name = 'uname') For a complete description on the (valid) syntax of the UPDATE statement, please read the manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_10008.htm#i2067715 share|improve this answer answered Jan 20 '12 at 12:58 a_horse_with_no_name 187k24235312 add a comment| up vote 2 down vote Not exactly the case of actual context of this question... But this exception can be reproduced by the next query: update users set dismissal_reason='he can't and don't want' where userid=123 Single quotes in words can't and wan't broke the string. In case string have only one inside quote e.g. 'he don't want' oracle throws more rel
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and ora-00933 sql command not properly ended delete policies of this site About Us Learn more about Stack Overflow the ora-00933 update company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users
Ora-00933 Group By
Badges Ask Question x Dismiss Join 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 http://stackoverflow.com/questions/8940471/sql-error-ora-00933-sql-command-not-properly-ended a minute: Sign up ORA-00933: SQL command not properly ended up vote 3 down vote favorite 1 I'm using OLEDB provider for ADO.Net connecting to an Oracle database. In my loop, I am doing an insert: insert into ps_tl_compleave_tbl values('2626899', 0, TO_DATE('01/01/2002', 'MM/DD/YYYY'), 'LTKN', 'LTKN', '52', 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'), http://stackoverflow.com/questions/72151/ora-00933-sql-command-not-properly-ended 0.000000, 0.000) The first insert succeeds but the second one gives an error: ORA-00933: SQL command not properly ended What am I doing wrong? sql oracle ora-00933 share|improve this question edited Oct 18 '11 at 15:52 Tshepang 4,7061059103 asked Sep 16 '08 at 13:27 Steve Horn 3,63093559 Are you trying to do both inserts at once? –Mark Nold Sep 16 '08 at 14:10 add a comment| 10 Answers 10 active oldest votes up vote 3 down vote accepted To me it seems you're missing a ; between the two statements: insert into ps_tl_compleave_tbl values('2626899', 0, TO_DATE('01/01/2002', 'MM/DD/YYYY'), 'LTKN', 'LTKN', '52', 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) ; Try adding the ; and let us know. share|improve this answer edited May 23 '12 at 7:24 Ravinder Reddy 16.3k22144 answered Sep 16 '08 at 13:30 massimogentilini 2,53732130 add a comment| Did you find this question interesting? Try our newsletter Sign up for our newsletter and get our top new questions delivered to your inbox (see an example). Subscribed!
Register Login [Solved] SQL command not properly ended Creating tables and queries Post a reply 11 posts • Page 1 of 1 https://forum.openoffice.org/en/forum/viewtopic.php?t=34336 [Solved] SQL command not properly ended by bartjeman » Wed Sep 22, 2010 10:38 pm I set up a new db using the Oracle jdbc driver.I created a query based on a single table.When I run the query, an error window pops up: "The data content could not be loaded" "ORA-00933: SQL command not properly sql command ended"The sql, however, looks just fine:SELECT "C_BPARTNER_ID", "AD_CLIENT_ID", "NAME", "ISCUSTOMER", "SALESREP_ID" FROM "COMPIERE"."C_BPARTNER" AS "C_BPARTNER"Thanks for your help! Last edited by bartjeman on Tue Sep 28, 2010 1:21 am, edited 1 time in total. OpenOffice 4.0.1 on Windows 7 bartjeman Posts: 127Joined: Sun Jan 03, 2010 6:23 amLocation: Toronto Top Re: SQL command not properly sql command not ended by Villeroy » Thu Sep 23, 2010 10:34 am Try to append a semicolon. Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.Ubuntu 14.04, OpenOffice 4.x & LibreOffice 5.x Villeroy Volunteer Posts: 22600Joined: Mon Oct 08, 2007 1:35 amLocation: Germany Top Re: SQL command not properly ended by bartjeman » Thu Sep 23, 2010 1:55 pm Hi VilleroyI appended the semi colon, same error.Code: Select all Expand viewCollapse viewSELECT "C_BPARTNER_ID", "AD_CLIENT_ID", "NAME", "ISCUSTOMER", "SALESREP_ID" FROM "COMPIERE"."C_BPARTNER" AS "C_BPARTNER";however this does work:Code: Select all Expand viewCollapse viewSELECT "C_BPARTNER_ID", "AD_CLIENT_ID", "NAME", "ISCUSTOMER", "SALESREP_ID" FROM "COMPIERE"."C_BPARTNER"Why do you think it barfs on Code: Select all Expand viewCollapse viewAS "C_BPARTNER" ? OpenOffice 4.0.1 on Windows 7 bartjeman Posts: 127Joined: Sun Jan 03, 2010 6:23 amLocation: Toronto Top Re: SQL command not properly ended by keme » Thu Sep 23, 2010 2:36 pm bartjeman wrote:Hi VilleroyI appended the semi colon, same error.Code: Select all Expand