Hi,
I have a table Trans
Amount Code Date ID Trans_ID
$5 JL 5/13/06 1 5876
$5 JL 5/13/06 1 245
$6 DR 01/06/05 3 6535
The trans_ID is a unique number for each record.
I would like to do the something like:
select code, amount, date from trans
where id<10 and code<>"CD"
group by code, amount, date
having sum([amount])>2
This returns only one of the $5 records. I would like to run a query so that BOTH of the $5 records are returned.
Can anyone help me with this? Thanks in advance.
I have a table Trans
Amount Code Date ID Trans_ID
$5 JL 5/13/06 1 5876
$5 JL 5/13/06 1 245
$6 DR 01/06/05 3 6535
The trans_ID is a unique number for each record.
I would like to do the something like:
select code, amount, date from trans
where id<10 and code<>"CD"
group by code, amount, date
having sum([amount])>2
This returns only one of the $5 records. I would like to run a query so that BOTH of the $5 records are returned.
Can anyone help me with this? Thanks in advance.