i have 2 tables 1.product fields are prod_no(primary key),prod_name 2.sales fields are sal_no,sal_date,cust,prod1(foreign key ie prod_no),prod2(foreign key ie prod_no),fst_qty,snd_qty
i want to sort my report based on prod_no
ex: product
prod_no prod_name
1 printer
2 paper
3 catridge
sales
sal_no sal_date customer prod1 prod2 fst_qty snd_qty
1 5-sep-09 aaa 1 3 2 3
2 5-sep-09 bbb 2 3 1 1
3 5-sep-09 ccc 1 2 3 4
i want report like this
prod_no
1 sal_no sal_date customer qty
1 5-sep-09 aaa 2
3 5-sep-09 ccc 3
2
2 5-sep-09 bbb 1
3 5-sep-09 ccc 4
3
1 5-sep-09 aaa 3
2 5-sep-09 bbb 1