Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which configuration is missing
Message
 
 
À
06/06/2008 14:12:13
Moacyr Zalcman
Independent Consultant
São Paulo, Brésil
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01322144
Message ID:
01322312
Vues:
14
This message has been marked as the solution to the initial question of the thread.

>Suppose this two queries:
>
>select * from chequescaixa where id='888516'
>Returns one Row
>
>[select * from caixamovimento where docid='888516'] &&[docid] refers to [id] in chequescaixa table
>Returns Nothing
>
>[select * from chequescaixa where id not in(select docid from caixamovimento)]
>Returns Nothing

The query will return no rows in 2 cases:
1. All IDs from 'chequescaixa' are present in 'caixamovimento'
2. There're records with NULLs in the 'docid' column in 'caixamovimento'


>But
>
>[select * from chequescaixa where id not in(select docid from caixamovimento where docID IS NOT NULL)]
>Returns one Row


See 2. above


>I supposed the query
>
>[select * from chequescaixa where id not in(select docid from caixamovimento)]
>
>should return the correct value.Is there anything I'm missing?


See 2. above. What result do you expect?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform