Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do 2 selects match?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00947744
Message ID:
00947755
Vues:
14
>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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform