This is the format of the query that I am trying to run:
SELECT * FROM
(SELECT Date, Thing='Thing'
FROM tblBalancesAsAt
WHERE Date='4 June 2002'
UNION
SELECT Date, Thing='Thing'
FROM tblBalancesAsAt
WHERE Date='6 May 2002')
The error that I'm getting is:
"Incorrect syntax near ')'."
My question is: have I made a syntax error, or can I not use a union within a subquery?
Thanks in anticipation.
SELECT * FROM
(SELECT Date, Thing='Thing'
FROM tblBalancesAsAt
WHERE Date='4 June 2002'
UNION
SELECT Date, Thing='Thing'
FROM tblBalancesAsAt
WHERE Date='6 May 2002')
The error that I'm getting is:
"Incorrect syntax near ')'."
My question is: have I made a syntax error, or can I not use a union within a subquery?
Thanks in anticipation.