I am using the following SQL command in my linked MS SQL Server :
SELECT * Into #LastMonth FROM OPENQUERY(QODBC, 'sp_report CheckDetail show TxnID,TxnNumber,SplitAccount,ClearedStatus, TxnType, RefNumber as CheckNumber, Date as CheckDate, Name, AccountNumber,Account, PaidAmount, OriginalAmount parameters DateMacro = ''LastMonth''')
This takes 2-4 minutes to run and returns 1500-3000 records. How can I make it faster? |