Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can you tell me that this given incremental load will give me a duplicacy ?
LIB CONNECT TO 'Microsoft_SQL_Server_192.168.1.112 (reportingserver_qsadmin)';
/*****Loading data above from MaxDate*****/
T1:
LOAD*;
SQL SELECT *
FROM "MicrosoftDynamicsAX"."dbo"."FbSalesReportAxTable"
where "Invoice Date">=DATEADD(DAY,1,EOMONTH(GETDATE(),-1));
STORE T1 into [lib://Daily QVD (reportingserver_qsadmin)/FbSalesReportAxTable $(vMonth).qvd](qvd);
Drop Table T1;
//Exit Script
/*****Concatenate Old QVD*****/
T2:
LOAD
*
FROM [lib://History QVD (reportingserver_qsadmin)/FbSalesReportAxPOSTable.qvd]
(qvd) where floor([Invoice Date])<=$(vLastMonth);
//exit Script
Concatenate(T2)
LOAD
*
FROM [lib://Daily QVD (reportingserver_qsadmin)/FbSalesReportAxTable $(vMonth).qvd]
(qvd) ;
//where not Exists([Invoice Date]);
//exit Script;
STORE T2 into [lib://History QVD (reportingserver_qsadmin)/FbSalesReportAxPOSTable_New.qvd](qvd);
exit Script
Hi @Gaurav_Kapoor,
I think is better practice using the same condition to load the new and historic registers:
In the T1 table: where "Invoice Date">=DATEADD(DAY,1,EOMONTH(GETDATE(),-1)); why don't you use "Invoice 'Date">='$(vLastMonth)?