Using EXCEPT in SQL Server

i am trying to find out the records that are in table 1 but not in table 2
i used the T-SQL statement

SELECT * from table1
EXCEPT
SELECT * from table2

but i am getting error

Incorrect syntax near the keyword 'except'.

please tell how i can fix it.........
please help
[332 byte] By [zulqernain] at [2007-11-19 19:14:26]
# 1 Re: Using EXCEPT in SQL Server
The syntaxt of except in SQL is EXCEPT ({SET1}, {SET2})
Shuja Ali at 2007-11-9 13:43:17 >
# 2 Re: Using EXCEPT in SQL Server
it is not working either...when i use the syntax proposed by you i get the error
[Microsoft][ODBC SQL Server Driver]Syntax error or access violation
zulqernain at 2007-11-9 13:44:17 >
# 3 Re: Using EXCEPT in SQL Server
it is not working either...when i use the syntax proposed by you i get the error
[Microsoft][ODBC SQL Server Driver]Syntax error or access violation
Does your SQL server have Analysis Services running?
Shuja Ali at 2007-11-9 13:45:16 >
# 4 Re: Using EXCEPT in SQL Server
i am not using analysis services right now i invoked the sql query analyzer from enterprise manager
zulqernain at 2007-11-9 13:46:22 >
# 5 Re: Using EXCEPT in SQL Server
i think you would have to use a "not exists" statement
Klymer at 2007-11-9 13:47:21 >