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})
# 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
# 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?