Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to only load the last 90 days of data into a QVD. The following is my script. How would I accomplish this without specifiying a date?
LOAD DISTINCT
VendorTransID as VND|TransID,
VendorTransType as VND|TransType,
Applymap('TransTypeMap',VendorTransType, Null()) as VND|TransTypeDesc,
Date(DayStart(VendorInvDate), 'M/DD/YYYY') as VND|InvDate, //Entered Date
VendorPONumber as VND|PONumber,
VendorPaidFlag as VND|PaidFlag,
VendorCheckNumber as VND|CheckNum,
Applymap('UserIDMap',VendorEnteredBy, Null()) as VND|UserName,
VendorInvNumber as VND|InvNumber,
VendorLocation as KEY|StoreNumber,
Date(DayStart(VendorEnteredDate), 'M/DD/YYYY') as VND|InvEntDate
FROM
(
WHERE(VendorInvDate >= '4/1/2014');
LEFT JOIN (VendorInvoices)
LOAD DISTINCT
VendorTransID as VND|TransID,
VendorID as VND|VendorID,
VendorInvAmount as VND|InvAmount
FROM
(
LEFT JOIN (VendorInvoices)
LOAD DISTINCT
VendorID as VND|VendorID,
VendorAcctNo as VND|VendorAcctNo,
VendorName as VND|VendorName
FROM
(
Something like this:
LET vDate = num(today())-90;
MyTable:
Load ... from xxxx.qvd (qvd)
where VendorInvDate > $(vDate);
Hi,
Try this:
LET vMinDate = '4/1/2014'; // or LET vMinDate = Date((Today()-90),'MM/DD/YYYY');
// Take care with Date format from your Fact Table, if VendorInvDate has values like '04/01/2014' you have to use same format or VendorInvDate has values like 'apr/01/2014' you have to specify this format...
FactTable:
Load
Field1,
Field2,
FieldN
from myFacttable.qvd
WHERE VendorInvDate >= '$(vMinDate)'; // Is very important ' ' to specify a date value
Left Join(FactTable)
Rest of script....
Best Regards.
Thanks, I'll ty that