[NBLUG/talk] OT - SQL query question
Mark Street
mark at oswizards.com
Mon Dec 5 14:31:48 PST 2005
On Monday 05 December 2005 2:45 pm, thiessen at sonic.net wrote:
> You haven't used 'NAME' to label anything else in your database, have you?
No, I changed the name of the field to FULLNAME to see if that would work....
same result.
Boy, I think I need to get my SQL reference out.... Since it was a simple
database with 1 table, I thought it would be a simple query. : (
> > This is really strange, I ran
> >
> > SELECT DISTINCT `ADDR1`,`CITY`,`STATE`,`ZIPCODE` from mydb;
> >
> > the query works as expected, returning roughly 7000 records of the
> > initial 12000, which is what I am expecting.
> >
> > If I place the `NAME` field either after ADDR1 or ZIPCODE the query does
> > not
> > work as expected and returns multiple instances of the ADDR1 records, not
> > DISTINCT.
--
Mark Street, RHCE
http://www.oswizards.com
--
Key fingerprint = 3949 39E4 6317 7C3C 023E 2B1F 6FB3 06E7 D109 56C0
GPG key http://www.oswizards.com/pubkey.asc
More information about the talk
mailing list