Hi Folks
I'n just starting out using SQL Server, though I've been using Oracle for many years. The syntax is tripping me up a lot. I have written the following query that is supposed to do a lookup on one table and get code to description translations from two others (Lookup and Siding) using Left Joins:
SELECT Ind.IndID, Ind.Active, Ind.UseRec, Ind.Selected, Lookup.LkDesc AS Shiprecv, Ind.Commodity, Ind.Cartype, Siding.SidingNotes AS Siding, Ind.Allocated, Ind.Notes FROM Industry AS Ind WHERE Ind.Active = 'X' AND LEFT JOIN Lookup ON Ind.ShipRecv = Lookup.LkCode WHERE Lookup.LkGroup = 'ShipRecv' AND LEFT JOIN Siding ON Ind.Siding = Siding.SidingID;
But this keeps throwing an error when I attempt to parse it on SQL Server Management Stidio. The error text is not particularly helpful. Can anyone spot what I'm doing wrong and point it out to me?
Thanks
Amesville
I'n just starting out using SQL Server, though I've been using Oracle for many years. The syntax is tripping me up a lot. I have written the following query that is supposed to do a lookup on one table and get code to description translations from two others (Lookup and Siding) using Left Joins:
SELECT Ind.IndID, Ind.Active, Ind.UseRec, Ind.Selected, Lookup.LkDesc AS Shiprecv, Ind.Commodity, Ind.Cartype, Siding.SidingNotes AS Siding, Ind.Allocated, Ind.Notes FROM Industry AS Ind WHERE Ind.Active = 'X' AND LEFT JOIN Lookup ON Ind.ShipRecv = Lookup.LkCode WHERE Lookup.LkGroup = 'ShipRecv' AND LEFT JOIN Siding ON Ind.Siding = Siding.SidingID;
But this keeps throwing an error when I attempt to parse it on SQL Server Management Stidio. The error text is not particularly helpful. Can anyone spot what I'm doing wrong and point it out to me?
Thanks
Amesville