Ora 00933 Update Error
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 ora-00933 sql command not properly ended in oracle the company Business Learn more about hiring developers or posting ads with us Stack ora-00933 sql command not properly ended select Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of ora-00933 sql command not properly ended insert 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Oracle SQL Developer UPDATE error: SQL Error: ORA-00933: SQL command not properly ended [duplicate] up vote -2 pl/sql: ora-00933: sql command not properly ended down vote favorite Possible Duplicate: How to UPDATE one column using another column in another table? SQL Error: ORA-00933: SQL command not properly ended I have tried everything I can think of but couldn't solve this SQL error: SQL Error: ORA-00933: SQL command not properly ended This is Oracle SQL. Have to say, Oracle SQL seems a lot more awkward and hard to use than the open-source version MySQL.... Many thanks. UPDATE
Ora-00933 Sql Command Not Properly Ended In Java
SALES_DATA_FAMILY_2007 A SET A.POG_ID=B.POG_ID FROM POG_HIERARCHY B WHERE A.FAMILY_ID=B.FAMILY ; sql oracle ora-00933 share|improve this question edited Jan 29 '12 at 11:12 Rafał Rawicki 13.4k33968 asked Jan 29 '12 at 3:24 ZM Wang 34128 marked as duplicate by a_horse_with_no_name, Andrew Barber, Rafał Rawicki, APC, Alex Poole Jan 29 '12 at 18:21 This question was marked as an exact duplicate of an existing question. Why do you post the exact same question twice immediately one after the other?. That won't get you faster or better answers. –a_horse_with_no_name Jan 29 '12 at 5:49 add a comment| 2 Answers 2 active oldest votes up vote 0 down vote Oracle doesn't support UPDATE FROM syntax - or didn't last time I looked. Here is the BNF: UPDATE [schema .] { table | view} [ alias ] SET column = { expr | subquery } [, column = { expr | subquery }]...[WHERE condition] ; (from: http://docs.oracle.com/html/A95915_01/sqcmd.htm) If you want to set all values of A.POG_ID, you can use this syntax: UPDATE SALES_DATA_FAMILY_2007 A SET A.POG_ID=(SELECT B.POG_ID FROM POG_HIERARCHY B WHERE A.FAMILY_ID=B.FAMILY); Or PL/SQL, just to update the rows in sales_data_family_2007 which are applicable: DECLARE BEGIN FOR sdf_row_to_update IN ( SELECT A.ROW_ID sdf_rowid, B.POG_ID FROM POG_HIERACHY B, SALES_DATA_FAMILY_2007 A WHERE B.FAMILY=A.FAMILY_ID) LOOP UPDATE sales_data_family_2007 SET pog_id=sdf_row_to_update.pog_id WHERE
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 Group By
policies of this site About Us Learn more about Stack Overflow the ora-00933: sql command not properly ended delete 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/9050662/oracle-sql-developer-update-error-sql-error-ora-00933-sql-command-not-properl a minute: Sign up Oracle: UPDATE statement causes ORA-00933 error up vote 1 down vote favorite Can anyone see what's wrong with this statement? I've tried for a while to fix it but to no avail, and the answers I've found on the web insist I need to remove an ORDERBY statement, something I'm not using. BEGIN UPDATE Tags SET MaskReasonId = http://stackoverflow.com/questions/12154984/oracle-update-statement-causes-ora-00933-error v_MaskReasonId, AppliedTime = v_AppliedTime, ExpireTime = v_ExpireTime, UserId = v_UserId, ClientNode = v_ClientNode, CommentId = v_CommentId FROM Tags WHERE Tag = v_sTag OR Tag = v_Tag; END; oracle share|improve this question edited Aug 28 '12 at 8:09 asked Aug 28 '12 at 7:55 Skulmuk 1871317 2 You cannot use a join in an update statement. –Ben Aug 28 '12 at 7:57 Cheers for the quick response @Ben. I've removed the INNER JOIN but I'm still getting the error. –Skulmuk Aug 28 '12 at 7:59 Did you also update your where clause after removing join.. ? –heretolearn Aug 28 '12 at 8:01 Yup, I'm now just checking WHERE Node = v_Node; EDIT: Just realised I'm no longer joining that table onto this one. I've swapped over to the Tag where clause but still no joy –Skulmuk Aug 28 '12 at 8:05 From tag is also not supported by oracle. –heretolearn Aug 28 '12 at 8:14 add a comment| 3 Answers 3 active oldest votes up vote 1 down vote accepted Oracle does not
? 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: SQL http://itknowledgeexchange.techtarget.com/itanswers/how-do-i-solve-the-ora-00933-sql-command-not-properly-ended-error-message/ command not properly ended error message? ITKE 440495 pts. Tags: Thanks! We'll email youwhen http://dba.stackexchange.com/questions/39273/convert-sql-server-update-statement-for-use-in-oracle 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', TO_DATE('01/01/2002', 'MM/DD/YYYY'), sql command 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 dd-mm-yyyy reversed sql command not 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 error processing your information. P
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 Convert SQL Server UPDATE Statement for Use in Oracle up vote 3 down vote favorite I can not get this UPDATE statement to work in an Oracle environment. It was written for SQL server. I am looking for some guidance on how to convert it. UPDATE SOB SET COA = CASE WHEN ( SELECT COUNT(*) FROM SOB WHERE ORD = T.ORD AND SHP_KEY <= T.SHP_KEY AND SHP_DTTM <= T.SHP_DTTM AND SOB_KEY <= T.SOB_KEY ) > 1 THEN 0 ELSE 1 END FROM SOB T WHERE COA IS NULL sql oracle share|improve this question asked Apr 4 '13 at 18:06 robarwebservices 4743614 what error you are getting ? As your query looks fine to me. PS: I dont have any oracle instance that I can try, but syntactically I dont see a problem. –Kin Apr 4 '13 at 19:17 Apparently Oracle does not accept this type of update statement SQL Error: ORA-00933: SQL command not properly ended 00933. 00000 - "SQL command not properly ended" *Cause: *Action: –robarwebservices Apr 4 '13 at 19:24 add a comment| 1 Answer 1 active oldest votes up vote 4 down vote accepted Just remove the FROM clause and replace the reference to the alias with the table name: UPDATE SOB SET COA = CASE WHEN ( SELECT COUNT(*) FROM SOB s2 WHERE s2.ORD = SOB.ORD AND s2.SHP_KEY <= SOB.SHP_KEY AND s2.SHP_DTTM <= SOB.SHP_DTTM AND s2.SOB_KEY <= SOB.SOB_KEY ) > 1 THEN 0 ELSE 1 END WHE