Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Confusing return from SQL Statement
Message
 
 
À
23/08/2002 09:21:27
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00692879
Message ID:
00692882
Vues:
14
You're using different tables in those selects: ciscontacts in the first and Contacts in the second.

>Hello Group,
>
>Hello group,
>
>If I run
>                   SELECT  conuniq, count(conuniq) as "Count"
>                   FROM ciscontacts
>                   GROUP BY conuniq
>                   HAVING (COUNT(conuniq) > 2)
>
>I get
>
>conuniq     Count
>-----------     -----------
>20005770        3
>191005021      3
>
>(2 row(s) affected)
>
>If I run
>                Select conuniq, title, firstname,lastname
>                From Contacts
>                Where conuniq = 20005770 or conuniq = 191005021
>
>I get
>
> conuniq         title             firstname        lastname
>-----------         -----         ---------------- --------------------
>20005770        Mrs.              Jane           Doe
>191005021      Mr.                John          Doe
>(2 row(s) affected)
>
>I expected six rows. What happened?
>
>Thanks
>Jim
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform