Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I need to put a where clause in load script.
Example :
LET vCutoffDate = makedate(2013);
LOAD [Invoice Date], [Standard Invoice Qty], [Invoice Amount], [Cost Value], [Invoice #]
FROM
Sales.QVD (qvd) WHERE [Invoice Date] >= vCutoffDate ;
How to achieve this ? Your help is badly needed.
Note : I do not want to change the SQL which is used to get data from DB using Select statement.
Regards,
Sahas
Sales.QVD (qvd) WHERE [Invoice Date] >= '$(vCutoffDate)' ;
Hi Sahas,
I think you're pretty much there, you just need dollar-expansion around the variable:
LET vCutoffDate = makedate(2013,10,30);
LOAD [Invoice Date], [Standard Invoice Qty], [Invoice Amount], [Cost Value], [Invoice #]
FROM
Sales.QVD (qvd) WHERE [Invoice Date] >= '$(vCutoffDate)' ;
However, using the WHERE clause here will break the optimised QVD load. You may want to think about pre-loading all possible dates greater than your variable, then using WHERE EXISTS([Invoice Date]) to keep the load optimised.
Hope this helps,
Jason
Sales.QVD (qvd) WHERE [Invoice Date] >= '$(vCutoffDate)' ;
hi
try this in load
WHERE [Invoice Date] >= $(vCutoffDate);
Dear All,
Thanks for your quick reply.