none
none

Reputation: 235

Error with my sql statement syntax, please help!

I'm not sure what I'm doing wrong here, but I have a synatx error

SELECT * `Orders` o
LEFT JOIN Shipment s 
ON  o.for_shipment_id  = s.shipment_id
WHERE 'internal_status' = 'HAS_SHIP_INFO' 
AND (s.ship_method = 'FEDEX' OR s.ship_method = 'USPS' OR s.ship_method = 'UPS')

Upvotes: 0

Views: 33

Answers (1)

Neil Knight
Neil Knight

Reputation: 48537

You are missing FROM after your *.

SELECT * 
  FROM   <-- You're missing this :o)
`Orders` oLEFT JOIN Shipment s ON  o.for_shipment_id  = s.shipment_idWHERE 'internal_status' = 'HAS_SHIP_INFO' AND (s.ship_method = 'FEDEX' OR s.ship_method = 'USPS' OR s.ship_method = 'UPS')

Upvotes: 2

Related Questions