mysql-ruby returns wrong record count

G

Greg Willits

Just started using mysql-ruby, and doing a simply query like this:

select distinct rcrdNo from someTable

I'm getting results back from mysql-ruby that is simply not correct.

rcrdNo is a unique random string that's 20 characters long. The only
thing I can think of is somehow going through mysql-ruby that the full
20 chars is not being considered in DISTINCT?

I can copy/paste the query among different clients, and they all agree
on the records count except for mysql-ruby. In years of using MySQL,
I've never come across a discrepency in a query like this through a
client / interface.

Any ideas?

-- gw
 
G

Greg Willits

Greg said:
Just started using mysql-ruby, and doing a simply query like this:
select distinct rcrdNo from someTable
I'm getting results back from mysql-ruby that is simply not correct.

rcrdNo is a unique random string that's 20 characters long. The only
thing I can think of is somehow going through mysql-ruby that the full
20 chars is not being considered in DISTINCT?


Duh, all I had to do was output the results of each row, and indeed, the
values of rcrdNo are only 13 characters long instead of 20.

What's up with that?

-- gw
 
G

Greg Willits

Greg said:
Duh, all I had to do was output the results of each row, and indeed, the
values of rcrdNo are only 13 characters long instead of 20.

What's up with that?


Egads, nevermind. Something funky going on w/data xfr into the test db
I'm using the script on.

Sorry for the noise :p

-- gw
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top