Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to retrieve the max date from a QVD. Date is in YYYY-MM-DD HH:MM:SS format. Below is my code:
Master:
LOAD
*
FROM [lib://IT Standard Metrics/QVD\Combined_Result.qvd]
(qvd);
Max:
load ([sys_updated_on]) as [Max_sys_updated_on]
resident Master ;
Let vMax = peek('[Max_sys_updated_on]',0,'Max');
However vMax is not populating anything.
Could you please help me on this?
Thanks,
Sarif
Maybe this one :
Master:
LOAD
*
FROM [lib://IT Standard Metrics/QVD\Combined_Result.qvd]
(qvd);
Max:
load Max([sys_updated_on]) as [Max_sys_updated_on]
resident Master ;
Let vMax = peek('[Max_sys_updated_on]',-1,'Max');
Maybe first convert the date..
Try like this
Master:
LOAD
*,
Floor (Date#( [sys_updated_on],'YYYY-MM-DD HH:MM:SS')) As temp
FROM [lib://IT Standard Metrics/QVD\Combined_Result.qvd]
(qvd);
Max:
load max(temp) as [Max_sys_updated_on]
resident Master;
Let vMax = peek('[Max_sys_updated_on]',0,'Max');
Hi,
Table:
LOAD * Inline [
sys_updated_on,number
2016-01-01 01:02:01,1
2016-01-01 01:01:01,2
2015-01-01 01:01:01,3
2016-09-01 01:01:01,4
2016-09-01 01:01:01,4
2016-09-01 01:01:01,4
];
Load
Max([sys_updated_on]) as Max_sys_update_on
Resident Table;
Let vMax = Peek('Max_sys_update_on');
Dimension : sys_update_on
Expression : count ({$<[sys_updated_on] = {"$(=TimeStamp('$(vMax)','YYYY-MM-DD hh:mm:ss'))"}>} number)