Hi
We have a table like follows:
id, account_name, amount, action_type
The amount field has both debit and credit entires and
action_type defines the type of transaction ( debit or
credit), debit entries have negative '-' symbol before
the amount.
where there are multipble transaction for the same id,
I need to write a query as under:
select id, amount(credit), amount(debit), amount
credit - amount debit from table where id is the same;
Its making it difficult for me because the amount
field has both debit and credit entries, your ideas,
codes or sql will be much appreciated.
Thanks
Mike
http://shopping.yahoo.com.au - Yahoo! Shopping
- Free CDs for thousands of Priority Shoppers!