Ora-00933 Error Update
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 ora-00933 sql command not properly ended in oracle Us Learn more about Stack Overflow the company Business Learn more about hiring ora-00933 sql command not properly ended select developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the
Ora-00933 Sql Command Not Properly Ended In Java
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 Oracle SQL Developer UPDATE error:
Pl/sql: Ora-00933: Sql Command Not Properly Ended
SQL Error: ORA-00933: SQL command not properly ended [duplicate] up vote -2 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 ora-00933 sql command not properly ended group by SQL seems a lot more awkward and hard to use than the open-source version MySQL.... Many thanks. UPDATE 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 W
SQL TuningSecurityOracle UNIXOracle LinuxMonitoringRemote supportRemote plansRemote servicesApplication Server ApplicationsOracle FormsOracle PortalApp UpgradesSQL ServerOracle ConceptsSoftware SupportRemote Support Development Implementation Consulting StaffConsulting PricesHelp Wanted! Oracle PostersOracle Books Oracle Scripts Ion Excel-DB
Ora-00933 Sql Command Not Properly Ended Delete
Don Burleson Blog
ora-00933 group by ORA-00933: SQL command not properly ended Question: on ORA-00933: SQL command not properly ended sql command not properly ended join CODE UPDATE PEOPLE SET PEOPLE.SURNAME = HR_DATA_IMPORT.SURNAME INNER JOIN PEOPLE ON HR_DATA_IMPORT.NI.NO = PEOPLE.NI_NUMBER; ORA-00933: SQL command not properly ended ORA-00933: SQL command not properly ended Cause: The SQL statement http://stackoverflow.com/questions/9050662/oracle-sql-developer-update-error-sql-error-ora-00933-sql-command-not-properl ends with an inappropriate clause. For example, an ORDER BY clause may have been included in a CREATE VIEW or INSERT statement. ORDER BY cannot be used to create an ordered view or to insert in a certain order. Action: Correct the syntax by removing the inappropriate clauses. It may be possible to duplicate the removed clause with another SQL http://www.dba-oracle.com/t_ora_00933_sql_command_ended.htm statement. For example, to order the rows of a view, do so when querying the view and not when creating it. This error can also occur in SQL*Forms applications if a continuation line is indented. Check for indented lines and delete these spaces. Answer by Chenn: I am never able to run an update using a join. You need a subselect. Filter it by pushing your field from the main query into the subselect. I'm not sure what your NI.No field is so you may need to take a look at that... UPDATE PEOPLE a SET a.SURNAME = ( select b.SURNAME from PEOPLE b where b.NI.NO = a.NI_NUMBER ) Get the Complete Oracle SQL Tuning Information The landmark book "Advanced Oracle SQL Tuning The Definitive Reference" is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher. ��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 http://dba.stackexchange.com/questions/39273/convert-sql-server-update-statement-for-use-in-oracle 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 command 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 sql command not 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 WHERE COA IS NULL share|improve this answer edited Apr 5 '13 at 8:45 answered Apr 4 '13 at 19:36 a_horse_with_no_name 22.8k64373 That wored perfectly. Going to take some getting used to :) –robarwebservices Apr 4 '13 at 19:41 It's a bad habit to use a self-join without aliases. I can't see how you can be sure that the join condition won't be a tautology (li