I have the following sql statement:
SELECT [tblPSSchedule].[ContractID]
, [tblPSSchedule].[Route]
, [tblPSSchedule].[SiteID]
, [tblPSSchedule].[CodeID]
, [tblPSSchedule].[Quantity]
, [tblPSSchedule].[Renew]
, [tblJobSite].[ServiceStartDate]
, [tblJobSite].[SiteID]
, [tblJobSite].[ZipCode]
, [tblZip].[Zip]
, [tblZip].[County]
FROM tblPSSchedule
LEFT JOIN [tblJobSite]
ON [tblPSSchedule].[SiteID] = [tblJobSite].[SiteID]
LEFT JOIN [tblZip]
ON [tblJobSite].[ZipCode] = [tblZip].[Zip];
I keep getting an error on the 2nd JOIN as follows:
If I take the 2nd JOIN away it appears to work but I can't see anything wrong with the second JOIN. I put the brackets around the table names and field names to insure accuracy but still no luck. The odd thing about it is the error message is cutting off the last bracket on = [tblZip].[Zip]; I don't know if that is a message limitation or isn't showing the whole error. When I put double ]'s at the end it shows the 1 bracket with the same error so I don't think it is the brackets. If I take the brackets off it cuts off the last letter of Zip.
It appears the error in in the second JOIN but I can't see anything wrong with it.
Maybe another pair of eye would help. I didn't put the table definitions here because of their size but will if it would help.
Thanks to all.