Me again
I found a work around to my problem:
select country, count(distinct client_name, client_address, etc..) clients
from addresses group by country
But I still don't understand why the below would not work. I downloaded the
3.# version of the OBDC but that didn't seem to help.
Help.....
Thanks
Jake
-----Original Message-----
From: Menard, Inc. Information Systems [mailto:isdept@stripped]
Sent: Wednesday, August 14, 2002 5:26 PM
To: David Kramer; frsgti@stripped; mysql@stripped
Subject: RE: Count and group by problems
For an example let's say that I have clients in multiple countries and I
want a list of the number of clients per country. In order to do this I
would think a statment like:
select country, count(*) clients from addresses group by country
would work just fine. I have have been working in VB on NT with odbc client
2.50.39.00.
I have tried all of the cursor combinations that I could think of, but I
still at a loss. Could there be a problem with the version of the client???
Thanks again
Jake
-----Original Message-----
From: David Kramer [mailto:DKramer@stripped]
Sent: Friday, August 09, 2002 5:59 PM
To: 'Menard, Inc. Information Systems'; mysql@stripped
Subject: RE: Count and group by problems
Im not sure I understand what it is that you are trying to do here??? Im
assuming your using PERL/SomeScriptingLang on something on NT to connect to
mysql using the ADO object... Within your Count(*) Group by are you trying
to return a result set that contains a duplicate row count, i.e.
Column=Booger, Count(*)=2??? If you provide a little more info I might be
able to help here, if what I said above is true then maybe do something like
this
select foo, count(*) CNT from Table group by foo having CNT > 1;
Not sure on the syntax though, but something along those lines...
DK
-----Original Message-----
From: Menard, Inc. Information Systems [mailto:isdept@stripped]
Sent: Friday, August 09, 2002 3:10 PM
To: mysql@stripped
Subject: Count and group by problems
Evening
I think I'm losing my mind. I have a very simple query that works fine in
MySQLFront but will not work when I connect using ADO:
select booger, count(*) from nose group by booger
If I try the above query with one record It works fine. Once I try it with
more records, nothing returns.
If I try:
select booger from nose group by booger
It returns results with one or more records.
Thanks for all of your help!
Jake
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <mysql-thread116768@stripped>
To unsubscribe, e-mail
<mysql-unsubscribe-dkramer=reflect.com@stripped>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <mysql-thread116773@stripped>
To unsubscribe, e-mail
<mysql-unsubscribe-isdept=menard-inc.com@stripped>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <mysql-thread117135@stripped>
To unsubscribe, e-mail
<mysql-unsubscribe-isdept=menard-inc.com@stripped>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php