hi i have a table like this: serialno varchar, debit integer, credit integer, amount numeric
the columns 'debit' and 'credit' refer to the acount number. I want to query the table to select all the rows where either debit = account or credit=account and to get two sums - one of the amounts where the account is on the debit side and the other on the credit side. Can i do this in one query? if so, how? -- regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in ಇಂಡ್ಲಿನಕ್ಸ வாழ்க! ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend