Page 1 of 1

adding col's to a select

Posted: Thu Jan 20, 2005 8:19 am
by pelegk2
i want to get col's data from a DB
but i have a DISTINCT as part of the query!

i have this query :
SELECT distinct order_header.region_id,delivery.round_num FROM order_header LEFT JOIN delivery ON order_header.del_id=delivery.del_id WHERE (TAARICH_HASPAKA >=1106197200 AND TAARICH_HASPAKA <=1106344740 AND TEUDAT_MISH='') OR (TAARICH_TEUDA >=1106197200 AND TAARICH_TEUDA <=1106344740) AND delay='0' order BY order_header.region_id asc

and i cant add to "order_header.region_id,delivery.round_num "
another col beacuse it will mess up the query !

so what to do?
thnaks in advance
peleg

Posted: Thu Jan 20, 2005 9:05 am
by feyd
you may need multiple queries if you can't figure anything out.. if you want help with writing the query, we'll need some more info, like table structure, a set of the data stored, and the expected results (using the data stored list).