SQL error: ORA-00933: SQL command did not end properly 00933. 00000 - "SQL command did not complete correctly"

I looked at this site and can not find a similar scenario. I am trying to run the following code

SELECT st.storeid, s.noofitems
FROM salestrnsaction AS st, soldvia AS s
WHERE st.tid = s.tid
ORDER BY noofitems ASC;

and I still get the error "SQL command error that did not complete correctly."

In particular, this is the message I receive.

SELECT st.storeid, s.noofitems
FROM salestrnsaction AS st, soldvia AS s
WHERE st.tid = s.tid
ORDER BY noofitems ASC
Error at Command Line : 287 Column : 22
Error report -
SQL Error: ORA-00933: SQL command not properly ended
00933. 00000 -  "SQL command not properly ended"
*Cause:    
*Action:

Thank.

+4
source share
2 answers

Are you using ORACLE correctly? Use ASin the alias FROM FROM is not valid in Oracle. Please refrain from using AS in providing aliases to tables.

Just write an alias after the table.

SELECT st.storeid, s.noofitems
FROM salestrnsaction st, soldvia s
WHERE st.tid = s.tid
ORDER BY s.noofitems ASC;
+7
source

. SELECT .

SELECT *
-- Inventory
FROM EQUIPMENT as EQP

, , AS Oracle SQL MySQL, , ...

SELECT *
-- Inventory
FROM EQUIPMENT EQP

.

0

All Articles