Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying generate a calculation to present date/time values and i'm having this error:
//**
Tmp_dates:
LOAD DISTINCT
Date(42573,450208137 + RecNo() - 1) AS [Data]
AUTOGENERATE (42619,605902234 - 42573,450208137+1)
//**
The code is:
Temp:
LOAD
min([DInicio]) as minDate,
max([DFim]) as maxDate
RESIDENT tmp_f_ados;
Let varMinDate = Num(Peek('minDate', 0, 'Temp'));
Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));
DROP TABLE Temp;
Tmp_dates:
LOAD DISTINCT
Date($(varMinDate) + RecNo() - 1) AS [Data]
AUTOGENERATE ($(varMaxDate) - $(varMinDate)+1);
Have anyone any idea thats happing?
many thanks,
May be give this a shot (single quotes around your variables)
Tmp_dates:
LOAD DISTINCT
Date('$(varMinDate)' + RecNo() - 1) AS [Data]
AUTOGENERATE ('$(varMaxDate)' - '$(varMinDate)'+1);
What exactly is the error?
IS this:
//**
Tmp_dates:
LOAD DISTINCT
Date(42573,450208137 + RecNo() - 1) AS [Data]
AUTOGENERATE (42619,605902234 - 42573,450208137+1)
//**
One reason may be
42573,450208137 should be 42573.450208137
dot '.' instead of comma ',' there
May be give this a shot (single quotes around your variables)
Tmp_dates:
LOAD DISTINCT
Date('$(varMinDate)' + RecNo() - 1) AS [Data]
AUTOGENERATE ('$(varMaxDate)' - '$(varMinDate)'+1);