Once TADOQuery.Open (cte query) I would like to iterate over the result set and depending on whether there is only one record with check_id(50001, 50003) to execute one block of code. In case when there are two or more records with the same check_id(50002) to execute different block of code.
Result set structure example.
row_num | buyer_id | amount | check_id |
---|---|---|---|
1 | 10001 | 25 | 50001 |
1 | 10001 | 30 | 50002 |
2 | 10002 | 10 | 50002 |
1 | 10003 | 10 | 50003 |
Much appreciated
check_id
, and then loop through the groups?