Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.


I keep receiving the error "SQL Command Not Properly Ended".

I think it has something with my attempt to do with the join.



FROM fgmulti as fg LEFT OUTER JOIN arinvt as ar ON fg.arinvt_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%'

asked 12 Feb '16, 11:01

rshukis's gravatar image

accept rate: 0%

Is this a question about MySQL? If it is then this is not the place to ask the question. This forum is for questions about SQL Anywhere.

(12 Feb '16, 11:31) Mark Culp

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.

permanent link

answered 12 Feb '16, 13:24

Breck%20Carter's gravatar image

Breck Carter
accept rate: 20%

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...

(13 Feb '16, 15:19) Volker Barth
Replies hidden

I will amend that to read "That query is syntactically valid in SQL Anywhere" since it throws a semantic error "table not found"... and yes, I did test it, to prove that it did not throw the syntactic error "SQL Command Not Properly Ended".

(14 Feb '16, 20:05) Breck Carter
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 12 Feb '16, 11:01

question was seen: 7,163 times

last updated: 14 Feb '16, 20:05