on 2016 Feb 12 11:01 AM
Hello,
I keep receiving the error "SQL Command Not Properly Ended".
I think it has something with my attempt to do with the join.
UPDATE FGMULTI
SET NON_CONFORM_ALLOCATABLE = 'Y'
FROM fgmulti as fg LEFT OUTER JOIN arinvt as ar ON fg.arinvt_id = ar.id
WHERE IN_Date = CurrentDate AND ar.Class LIKE 'CP%' OR ar.Class LIKE 'FG%' OR ar.Class LIKE 'IN%' OR ar.Class LIKE 'LA%' OR ar.Class LIKE 'PK%'
Request clarification before answering.
That query is valid in SQL Anywhere... perhaps you should switch.
For more reasons to switch from MySQL to SQL Anywhere, see the Unpublished MySQL FAQ.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That query is valid in SQL Anywhere.
Are you sure?
I'm not that sure because of the different use of correlation names in the UPDATE clause and the FROM clause for table FGMULTI (i.e. without an alias in the former, with an alias in the latter) - cf. the docs:
If the FROM clause is present, table-name must specify the sole table to be updated, and it must qualify the name in the same way as it appears in the FROM clause. If correlation names are used in the FROM clause, the identical correlation name must be specified as table-name.
That being said, of course SQL Anywhere is way more flexible than some other DBMSs in that respect (updates on joins), for example MS SQL Server does not allow an alias in the UPDATE clause, AFAIK...
User | Count |
---|---|
50 | |
9 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.