Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Re: Query
Divers
Thread ID:
00957852
Message ID:
00957868
Vues:
24
You've to use either NOT IN or correlated subquery with NOT EXISTS.
Select Meeting_ID
	From Meetings
	Where Meeting_ID Not IN ( select meeting_ID from Events)

-- Or

Select Meeting_ID 
	From Meetings mt
	Where Not Exists ( select * from Events ev 
			WHERE ev.Meeting_ID = mt.Meeting_ID)
> I have a simple query. I have used this query successfuly in the past, however this time it is not working.
>
>Here is the query
>
>Select Meeting_ID
>From Meetings
>Where Not exists(select meeting_ID from Events)
>
>It should returns 1,3,35, because the Ids in Meetings tables (1,3,35) are not in the Events table. Instead it returns 0 records.
>What is wrong with my statement?
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform