Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
Can any one please help me to restrict only last 2days data in the below extraction.
Load
DepartmentName,
Departmentid,
Date,
Salary
From ....
Here Date is in DD/MM/YYYY hh:mm:ss format. Requirement is Need to extract only Today and previous date data into qvd i.e., need to restrict only last 2days.
Please help me on this.
Thanks in advance.
Load
DepartmentName,
Departmentid,
Date,
Salary
From ....
Where Date(Date,'MM/DD/YYYY')>=date(Today()-1,'MM/DD/YYYY')
Hi,
You can try like this
Load
DepartmentName,
Departmentid,
date(Date,'MM/DD/YYYY') as Date,
Salary
From ...
where Date<=date#(date(today()),'MM/DD/YYYY') and Date>=date#(date(today()-1),'MM/DD/YYYY');
Try this Hope so it will help you.
E.g.
X:
load
Date(MakeDate(2018)+RecNo()-1,'DD/MM/YYYY') as Date,
rand()*1000 as Sales
AutoGenerate 365;
STORE X into 'C:\Project\MyTable6.qvd'(qvd);
DROP Table X;
load *
From 'C:\Project\MyTable6.qvd'(qvd)
where Date>=Today()-1 and Date<=Today();