Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query using not in clause
Message
De
25/02/2004 12:02:39
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brésil
 
 
À
25/02/2004 11:32:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00880737
Message ID:
00880753
Vues:
12
Hi Gaylen!

>I have a policy table with 2 years worth of data. Each record is either a year 2003 or 2004 record. I need to know which policy does not have a 2004 record. I remember seeing something about using two selects with a "Not IN ( select ......)" clause.
>I know I can create two table and scan one and check it against the other but I was looking for a SQL solution.
>Couldn't find anything in Help or Hacker's on this or didn't look in the right places.
>Thanks
>Gaylen

If all policy have the year 2003, you can try this:
Select myCod from myTable group by myCod having count(myCod) < 2
I hope this help you!
Erick
Força Sempre!
Strength Always!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform