Hi I am a novice to SQL and I was hoping someone can tell me where I'm going wrong. I have a small sql statement that keeps giving me an error message. Can any one help please. Thank you in advance.
> UPDATE AMFLIBT.MOROUT SET OPSTC = 40 WHERE (select AMFLIBT.MOROUT.ORDNO, AMFLIBT.MOROUT.OPSEQ, AMFLIBT.MOROUT.OPSTC, amflibt.morout.wkctr, amflibt.momast.ostat, AMFLIBT.MOMAST.FITEM FROM AMFLIBT.MOROUT INNER JOIN AMFLIBT.MOMAST ON AMFLIBT.MOROUT.ORDNO = AMFLIBT.MOMAST.ORDNO where fitem = '300.605.407.8' and opseq < '0047' and opstc = 10 and wkctr = 'INFO' and ostat <> 10)
SQL State: 42601
Vendor Code: -104
Message: [SQL0104] Token <END-OF-STATEMENT> was not valid. Valid tokens: < > = <> <= !< !> != >= ?< ?> ?= IN. Cause . . . . . : A syntax error was detected at token <END-OF-STATEMENT>. Token <END-OF-STATEMENT> is not a valid token. A partial list of valid tokens is < > = <> <= !< !> != >= ?< ?> ?= IN. This list assumes that the statement is correct up to the token. The error may be earlier in the statement, but the syntax of the statement appears to be valid up to this point. Recovery . . . : Do one or more of the following and try the request again: -- Verify the SQL statement in the area of the token <END-OF-STATEMENT>. Correct the statement. The error could be a missing comma or quotation mark, it could be a misspelled word, or it could be related to the order of clauses. -- If the error token is <END-OF-STATEMENT>, correct the SQL statement because it does not end with a valid clause.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!