That syntax isn’t valid in Oracle. You can do this:
UPDATE table1 SET table1.value = (SELECT table2.CODE FROM table2 WHERE table1.value = table2.DESC) WHERE table1.UPDATETYPE='blah' AND EXISTS (SELECT table2.CODE FROM table2 WHERE table1.value = table2.DESC);
Or you might be able to do this:
UPDATE (SELECT table1.value as OLD, table2.CODE as NEW FROM table1 INNER JOIN table2 ON table1.value = table2.DESC WHERE table1.UPDATETYPE='blah' ) t SET t.OLD = t.NEW
It depends if the inline view is considered updateable by Oracle ( To be updatable for the second statement depends on some rules listed here ).
Related Posts:
- What is the difference between “INNER JOIN” and “OUTER JOIN”?
- What is the difference between “INNER JOIN” and “OUTER JOIN”?
- ORA-00904: invalid identifier
- SQL Inner-join with 3 tables?
- how to fix oracle ORA-01722 invalid number error
- ORA-00979 not a group by expression
- ORA-00907: missing right parenthesis
- How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?
- ORA-01843 not a valid month- Comparing Dates
- ORA-00918: column ambiguously defined in SELECT *
- Oracle error : ORA-00905: Missing keyword
- How do I limit the number of rows returned by an Oracle query after ordering?
- Oracle SELECT TOP 10 records
- Can a foreign key be NULL and/or duplicate?
- How to Select Top 100 rows in Oracle?
- Difference between JOIN and INNER JOIN
- ORA-12560: TNS:protocol adaptor error
- ORA-00972 identifier is too long alias column name
- Oracle Apex column link from LOV values
- PLS-00103: Encountered the symbol when expecting one of the following:
- What’s the difference between RANK() and DENSE_RANK() functions in oracle?
- ORA-00918: column ambiguously defined in SELECT *
- ORA-00918: column ambiguously defined in SELECT *
- Oracle – ORA-01489: result of string concatenation is too long [duplicate]
- ORA-01861: literal does not match format string
- What is it exactly a BLOB in a DBMS context
- “ORA-01438: value larger than specified precision allowed for this column” when inserting 3
- How do you create a temporary table in an Oracle database?
- Oracle “Partition By” Keyword
- How to insert date values into table
- Oracle SQL: Update a table with data from another table
- SQL selecting rows by most recent date with two unique columns
- ORA-06502: PL/SQL: numeric or value error: character string buffer too small
- Comparing Dates in Oracle SQL
- Convert timestamp to date in Oracle SQL
- How do I reset a sequence in Oracle?
- MySQL equivalent of DECODE function in Oracle
- Oracle: If Table Exists
- DATEDIFF function in Oracle
- How to create id with AUTO_INCREMENT on Oracle?
- LEFT function in Oracle
- What is the difference between Views and Materialized Views in Oracle?
- How do I view the Explain Plan in Oracle Sql developer?
- ORA-01779: cannot modify a column which maps to a non key-preserved table
- ORA-01735: invalid ALTER TABLE option – Toad
- ora-06553 pls-306 wrong number or types of arguments in call to ‘ogc_x’
- Unknown column in ‘field list’ error on MySQL Update query
- How to create Temp table with SELECT * INTO tempTable FROM CTE Query
- Using group by on multiple columns
- Efficiently convert rows to columns in sql server
- Nested select statement in SQL Server
- What’s the difference between VARCHAR and CHAR?
- How to split the name string in mysql?
- How do you trouble shoot a “Data type mismatch in criteria expression” error in MS Access 2010?
- Sql Server equivalent of a COUNTIF aggregate function
- Column name or number of supplied values does not match table definition
- Inserting data into a temporary table
- Simple PHP Pagination script
- SQL – HAVING vs. WHERE
- When to use “ON UPDATE CASCADE”
- How to SUM two fields within an SQL query
- DateTime2 vs DateTime in SQL Server
- Difference between numeric, float and decimal in SQL Server
- ERROR: there is no unique constraint matching given keys for referenced table “bar”
- How do I query for all dates greater than a certain date in SQL Server?
- String or binary data would be truncated. The statement has been terminated
- Error converting data type varchar to float
- How to concatenate text from multiple rows into a single text string in SQL Server
- Cast from VARCHAR to INT – MySQL
- Conversion failed when converting the varchar value ‘simple, ‘ to data type int
- postgresql: error duplicate key value violates unique constraint
- Is there a workaround for ORA-01795: maximum number of expressions in a list is 1000 error?
- “You tried to execute a query that does not include the specified aggregate function”
- Insert into a MySQL table or update if exists
- Check if MySQL table exists without using “select from” syntax?
- mysql update column with value from another table
- ‘NOT LIKE’ in an SQL query
- SQL Server dynamic PIVOT query?
- What does Include() do in LINQ?
- SQL Server “cannot perform an aggregate function on an expression containing an aggregate or a subquery”, but Sybase can
- Get everything after and before certain character in SQL Server
- ORDER BY items must appear in the select list if SELECT DISTINCT is specified
- ROW_NUMBER() in MySQ
- Foreign key references invalid table
- SQLite string contains other string query
- Varchar invalid for Sum operator
- SQL: How to properly check if a record exists
- Cannot insert explicit value for identity column in table ‘table’ when IDENTITY_INSERT is set to OFF
- SQL select of users by metadata
- WordPress SQL LIKE request doesn’t work for fields with special symbols
- WordPress database error: You have an error in your SQL syntax
- Better way to migrate to server?
- Why line returns are not reapply after doing esc_sql?
- WooCommerce database query : Get product category image path+name from thumbnail_id [closed]
- WordPress can I manually add columns in users table and display it in the default manage user plugin and registration form? [closed]
- Help me SELECT thumbnail from SQL and use
- Why is my insert row only inserting the final row from the loop into the database rather than just inserting one
- Creating a “forum” – showing last post or last commented post
- Replace Unwanted Space in Post Content URL
- Deleting the MySQL database