[NBLUG/talk] OT - SQL query question
Mark Street
mark at oswizards.com
Mon Dec 5 11:22:06 PST 2005
Hmmm, I tried that too and it does not work as expected.
I exported the db as text and created a MySQL database.
If I run the query as stated below I still do not get the distinct ADDR1 field
with the additional fields listed, if I run the query as SELECT DISTINCT
ADDR1 from mydb I get the correct disctinct addresses from the ADDR1
field.... but of course I want the name, city, stat, zip fields as well.
Maybe my logic is not correct?
On Friday 02 December 2005 12:00 pm, Eric Eisenhart wrote:
> On Fri, Dec 02, 2005 at 10:55:30AM -0800, Mark Street wrote:
> > I would want the NAME and ADDR2, etc. fields as well as the DISTINCT
> > field. Actually my ADDR1 field contains the street number and name, not a
> > biggie. I guess #2 below would come closest to my requirements.
> You want:
> SELECT DISTINCT ADDR1,field2,field3 from mydb
> (no parens)
--
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