Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Confusing return from SQL Statement
Message
De
23/08/2002 09:21:27
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Confusing return from SQL Statement
Divers
Thread ID:
00692879
Message ID:
00692879
Vues:
41
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform