You are here: UNION / INTERSECT / EXCEPT in SQL Server 2000 « MsSQL Server « IT news, forums, messages
UNION / INTERSECT / EXCEPT in SQL Server 2000

Posted by James Foreman on 09/21/06 10:59

Hi,

I'm coming back to Sql Server after 4 years away, using other RDBMS,
and there's a few things I'm struggling to remember how to do (if I
could do them in the first place...)

Main amongst those is EXCEPT syntax.

In DB2, if I have two sets of data and I want to exclude the second set
from the first, I can do:

SELECT col1, col2, col3, ... colN
FROM table1
EXCEPT
SELECT col1, col2, col3, ... colN
FROM table2
;

But SQL Server balks at this. I've had a quick look in the T-SQL help
for EXCEPT, but I didn't find that particularly enlightening. Any
pointers as to how I should be doing this?

Thanks

James

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация