Hi All,
I have two tables:
1. hAccount.dbf ( Contains records from 01/01/2003 to 31/12/2016 }
2. Account.dbf ( Contains records from 01/01/2017 till todate )
I am running this query:
If the user is asking the records from 01/12/2016 to 31/10/2017. It is coming, but what about the opening balance (sum of debit and credit before {01/12/2016}).
Also, it is very very slow.
Please guide.
Thanks
Saif
I have two tables:
1. hAccount.dbf ( Contains records from 01/01/2003 to 31/12/2016 }
2. Account.dbf ( Contains records from 01/01/2017 till todate )
I am running this query:
Code:
Select hAccount.creference, hAccount.cdate, hAccount.ccode, Code.full_name,;
hAccount.remarks, Code.chead, hAccount.debit, hAccount.credit;
FROM ;
village!hAccount ;
INNER Join village!Code ;
ON hAccount.ccode = Code.ccode;
WHERE Between(cdate,md1,md2) ;
UNION ;
Select Account.creference, Account.cdate, Account.ccode, Code.full_name,;
Account.remarks, Code.chead, Account.debit, Account.credit;
FROM ;
village!Account ;
INNER Join village!Code ;
ON Account.ccode = Code.ccode;
WHERE Between(cdate,md1,md2) ;
ORDER By cdate ;
INTO Cursor TempAct Readwrite
Index On ccode Tag ccode Additive
If the user is asking the records from 01/12/2016 to 31/10/2017. It is coming, but what about the opening balance (sum of debit and credit before {01/12/2016}).
Also, it is very very slow.
Please guide.
Thanks
Saif