Dark0Prince
Active Member
- Joined
- Feb 17, 2016
- Messages
- 433
Any idea what I can do to speed this up it goes super fast when i run it from telnet. When i use SQL to pull into excel this report takes super long. Here's the code. The question marks are using the client number in excel and a date like today()-1460 formula, because I don't know how to write that into the code. TIPS appreciated.
Code:
SELECT Debtor_Master_Logic_Blocks8.PROG_REPORT_ACCT_NUM_AND_PRACCT, Dbtr_Clnt_Generl_Inf.Date_Listed, Dbtr_Balances.INITIAL_BALANCE, Dbtr_Status.Last_Payment, Letter_Variables.Amt_Paid_On_Acct, Dbtr_Balances.Principal_Balance, Debtor_Master_Logic_Blocks7.INVENT_INVEN2
FROM SQLUser.Dbtr_Balances Dbtr_Balances, SQLUser.Dbtr_Clnt_Generl_Inf Dbtr_Clnt_Generl_Inf, SQLUser.Dbtr_Status Dbtr_Status, SQLUser.Debtor_Master_Logic_Blocks7 Debtor_Master_Logic_Blocks7, SQLUser.Debtor_Master_Logic_Blocks8 Debtor_Master_Logic_Blocks8, SQLUser.Letter_Variables Letter_Variables
WHERE Dbtr_Balances.ACCOUNT_NUM = Dbtr_Clnt_Generl_Inf.ACCOUNT_NUM AND Dbtr_Balances.ACCOUNT_NUM = Dbtr_Status.ACCOUNT_NUM AND Dbtr_Balances.ACCOUNT_NUM = Debtor_Master_Logic_Blocks7.ACCOUNT_NUM AND Dbtr_Balances.ACCOUNT_NUM = Debtor_Master_Logic_Blocks8.ACCOUNT_NUM AND Dbtr_Balances.ACCOUNT_NUM = Letter_Variables.ACCOUNT_NUM AND Dbtr_Clnt_Generl_Inf.ACCOUNT_NUM = Dbtr_Status.ACCOUNT_NUM AND Dbtr_Clnt_Generl_Inf.ACCOUNT_NUM = Debtor_Master_Logic_Blocks7.ACCOUNT_NUM AND Dbtr_Clnt_Generl_Inf.ACCOUNT_NUM = Debtor_Master_Logic_Blocks8.ACCOUNT_NUM AND Dbtr_Clnt_Generl_Inf.ACCOUNT_NUM = Letter_Variables.ACCOUNT_NUM AND Dbtr_Status.ACCOUNT_NUM = Debtor_Master_Logic_Blocks7.ACCOUNT_NUM AND Dbtr_Status.ACCOUNT_NUM = Debtor_Master_Logic_Blocks8.ACCOUNT_NUM AND Dbtr_Status.ACCOUNT_NUM = Letter_Variables.ACCOUNT_NUM AND Debtor_Master_Logic_Blocks7.ACCOUNT_NUM = Debtor_Master_Logic_Blocks8.ACCOUNT_NUM AND Debtor_Master_Logic_Blocks7.ACCOUNT_NUM = Letter_Variables.ACCOUNT_NUM AND Debtor_Master_Logic_Blocks8.ACCOUNT_NUM = Letter_Variables.ACCOUNT_NUM AND (Dbtr_Clnt_Generl_Inf.Client=?) AND (Dbtr_Clnt_Generl_Inf.Date_Listed>?)
Last edited: