I am getting a missing operator error in the following SQL statement:
SELECT Sample.Number, Sample.SampleDate, BOD.BOD_Concentration_IN, BOD.BOD_Concentration_OUT, TSS.TSS_Influent, TSS.TSS_Effluent
FROM SampleInformation as Sample
INNER JOIN BOD_Data as BOD ON Sample.Number = BOD.Number
INNER JOIN TSS_Data as TSS ON Sample.Number = TSS.Number
WHERE (DATEPART('m',Sample.SampleDate) = DATEPART('m',#1/13/2016 12:01:00 PM#))
AND (DATEPART('yyyy',Sample.SampleDate) = DATEPART('yyyy',#1/13/2016 12:01:00 PM#)) ORDER BY Sample.SampleDate
I eliminated the "WHERE" clause and still got the error, so it must be in the join.
Can anyone see what I am missing here? Thanks!