Search code examples
sqloracletable-alias

getting error in oracle 009933 sql command not properly ended


here is my query by I didn't understand why it is not working.

  select o.MFR, o.PRODUCT, c.company, p.PRICE 
    from ORDERS AS o 
    inner join customers AS c on c.CUST_NUM = o.CUST
    inner join PRODUCTS AS p On p.MFR_ID = o.MFR 
    where o.CUST in ('2111','2112','2105','2119') and o.AMOUNT < '3000' 
    order by c.company DESC;

Solution

  • remove as from alias

    select o.MFR, o.PRODUCT, c.company, p.PRICE 
    from ORDERS  o 
    inner join customers  c on c.CUST_NUM = o.CUST
    inner join PRODUCTS  p On p.MFR_ID = o.MFR 
    where o.CUST in ('2111','2112','2105','2119') and o.AMOUNT < '3000' 
    order by c.company DESC;
    

    oracle does not supports in the FROM it support as on select column