Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
main:
LOAD Meter_Reading_Date,
if(Meter_Reading_Date>='01/04/2012' and Meter_Reading_Date<='31/03/2013','12/13',
if(Meter_Reading_Date>='01/04/2011' and Meter_Reading_Date<='31/03/2012','11/12',
if(Meter_Reading_Date>='01/04/2010' and Meter_Reading_Date<='31/03/2011','10/11',
if(Meter_Reading_Date>='01/04/2009' and Meter_Reading_Date<='31/03/2010','09/10',
if(Meter_Reading_Date>='01/04/2008' and Meter_Reading_Date<='31/03/2009','08/09'))))) as Read_Year,
Equipment_Number,
Device,
Places_Before_Decimal_Point_In_Meter_Reading as Reading
FROM
(qvd)
where Exists(Equipment_Number)
;
res:
load Read_Year as [08/09],
if(FirstSortedValue(Reading,-Meter_Reading_Date)-FirstSortedValue(Reading,Meter_Reading_Date)<0,
FirstSortedValue(Reading,-Meter_Reading_Date)-FirstSortedValue(Reading,Meter_Reading_Date)+9999,
FirstSortedValue(Reading,-Meter_Reading_Date)-FirstSortedValue(Reading,Meter_Reading_Date)) as oheightonine
resident main
where [08/09]='08/09'
;
HI,
In the resident load script the where condition is the problem
Instead of this
mainwhere [08/09]='08/09'
use this
Read_Year ='08/09'
Regards,
Jagan.