I'm simplifying slightly, here's the basic tables:    

build
-------
idx     int     
name    char(16)

test_name
--------
idx     int
name    char(64)

main_table
------------
idx     int unsigned
test_name_idx     medint 
status          char
build   int
swip    char(11)

I want to do the following query, but a little more:

select distinct   test_name.name, status, build.name  from main_table,
test_name, build where test_name_idx=test_name.idx AND build.name ='x5.1.0'
AND build.idx=build_idx;  

The above works fine.  But  I need to get the swip value at the same time,
which will break the distict function of returning one result for each test
name because I may have multiple results for a single test name & build.
The following does not work:

select distinct   test_name.name, status, build.name, swip  from main_table,
test_name, build where test_name_idx=test_name.idx AND build.name
='x5.1.0' AND build.idx=build_idx;  
    

Any suggestions?

-mike

---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to