0

when i run the following query with an inner join it gives me the following error

"ORA-00933: SQL command not properly ended" in my from clause.Am i not positioning it in the correct format?

update
             Table t

    set
         t.gross =4000
 FROM Schema1.Table  t INNER JOIN schema2.TYPES AS gt ON t.GRADE=gt.DESCRIPTION
    where
       GT.GRADE_TYPE_CODE='test'
doe
  • 148
  • 4
  • 25
  • From the Documentation area of SO (since it's a frequent question that confuses many, including many experts): http://stackoverflow.com/documentation/oracle/8061/update-with-joins#t=201701061428442118327 –  Jan 06 '17 at 14:29

2 Answers2

1

I think what you are asking is already on stackoverflow.

This can help you:

https://stackoverflow.com/a/2446834/6517368

Community
  • 1
  • 1
Bhasin
  • 23
  • 1
  • 6
1

Try this:

UPDATE         TABLE t
    set          t.gross =4000
  where  t.GRADE in (   select gt.DESCRIPTION from  schema2.TYPES gt where
       GT.GRADE_TYPE_CODE='test')
XING
  • 9,608
  • 4
  • 22
  • 38