Syntax Error

grant22

New member
Local time
Today, 04:46
Joined
Jun 15, 2009
Messages
4
SELECT*

FROM test2

INNER JOIN test1 ON test2.Unique = test1.Unique

WHERE test2.Day = (Select Max(test1.Day))
AND test2.Ex8<>test1.Ex8;



- Getting a Syntax Error in my WHERE statement, can anyone point me in the right direction. Relatively new to SQL coding.
 
Change this part:

(Select Max(test1.Day))

to this:

(Select Max(test1.Day) FROM test1)
 
This is probably a red herringsince SOS did not mention it, but as you cannot give criteria for any fields when * is used can you use it and a Where clause with a subquery.?

Brian

This was a case of posting before brain was engaged.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom