Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do 2 selects match?
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00947744
Message ID:
00947755
Views:
13
>Looks like it should work - thanks again, Serge
>
Mike,

Here's another way
SELECT * 
  FROM mytable mt1
  WHERE mt1.ItemCode = 1 
	AND NOT EXISTS ( SELECT * FROM mytable mt2 
			  WHERE mt1.FldName = mt2.FldName)
UNION ALL
SELECT * 
  FROM mytable mt1
  WHERE mt1.ItemCode = 2 
	AND NOT EXISTS ( SELECT * FROM mytable mt2 
			  WHERE mt1.FldName = mt2.FldName)
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform