in reply to Re^3: SQL Database Table to Perl Script
in thread SQL Database Table to Perl Script
Maybe this SQL will help.
SELECT AccNum, max(date), Type, sum(Amount) FROM transaction GROUP BY + AccNum, Type union SELECT AccNum, max(date),'Balance', sum(if (type='Debit',-1*Amount,Amo +unt)) FROM transaction GROUP BY AccNum; SELECT * FROM transaction t where chequeno is not null or ddno is not +null;
And this has little to do with perl this is an datbase question
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: SQL Database Table to Perl Script
by prithviraj (Novice) on Oct 05, 2012 at 17:23 UTC | |
by Anonymous Monk on Oct 05, 2012 at 20:13 UTC |