Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Confusing return from SQL Statement
Message
De
23/08/2002 10:41:11
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00692879
Message ID:
00692924
Vues:
18
Hello Sergy,

My brain is fried, these people are a school system and difficult to work with. Thank you for your patients.

Thanks again
Jim

>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform