Help required for some SQL commands
Posted: Fri Mar 19, 2010 9:31 am
Hello All,
Suppose I want to get Debit Total and Credit Total of my Leger table. Is it possible to write SQL statements (as I did in VFP) with SQLite as follows :
If now, can you please suggest how to do this
Thanks in advance
With best regards.
Sudip
Suppose I want to get Debit Total and Credit Total of my Leger table. Is it possible to write SQL statements (as I did in VFP) with SQLite as follows :
Code: Select all
table := sql(mdb, "SELECT SUM(IF(TRAN_TYPE = "DEBIT", AMT, 0.00)) AS DEBITAMT, "+ ;
"SUM(IF(TRAN_TYPE = "CREDIT", AMT, 0.00)) AS CREDITAMT FROM LEDGER WHERE VRDT >= "+;
c2sql(mFromdt)+" AND VRDT <= "+c2sql(mTodt))If now, can you please suggest how to do this
Thanks in advance
With best regards.
Sudip