syntax error for subselect
Posted on 2005-03-25
I am running sql server desktop edition (MSDE 2000).
I need a count of a union:
select count (*) from ( select id from member union select id from dropoffpoint )
Running the above in the Query analyzer SQL Server yields this error:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near ')'.
Even a simplified version:
select * from (select id from member)
yields the same error.
Can anyone pls try something similar on MSDE? On the fullblown SQL Server?
Any help appreciated....I do not wish to resort to a temp table because it should be unnecessary here.