Sad Der
accessd666 at yahoo.com
Fri Feb 25 00:45:32 CST 2005
Hi group, I need help with a query. Here's a table with the columns tran_num and deal_num and here are some values: tran_num deal_num 10 1 10 1 11 1 12 1 13 2 14 3 14 3 (the data is correct...there are about 50 more columns in the table!) I need a query that returns all deal_no with different tran_no attached to it. That means that the query should only return Deal_num 1. Not deal_num 3 because that has the same tran_num (14) twice. I came up with this simple one: SELECT deal_num, count(tran_num) FROM ess_gaspositionrecon_report group by deal_num having count(tran_num) > 1 But this one returns deal_num 1 and 3. TIA Regards, sander __________________________________ Do you Yahoo!? Yahoo! Sports - Sign up for Fantasy Baseball. http://baseball.fantasysports.yahoo.com/