xiaodao
05-08-2007, 05:36 AM
table structure
C1 ID C2
D1 ID1 10
D2 ID2 6
D3 ID3 14
D4 ID4 5
first i want sort the table according to c1, then i want to add c2 up, then find out the id which when added to sum >=200
can everything combine in one query thanks
C1 ID C2
D1 ID1 10
D2 ID2 6
D3 ID3 14
D4 ID4 5
first i want sort the table according to c1, then i want to add c2 up, then find out the id which when added to sum >=200
can everything combine in one query thanks