Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
LOAD * INLINE [
startdate, enddate
20/07/2015, 30/07/2015
];
date1:
load date(Date#(startdate,'DD/MM/YYYY'),'MM/DD/YYYY') as start_date,
date(Date#(enddate,'DD/MM/YYYY'),'MM/DD/YYYY') as end_date
resident date;
drop table date;
let stratdate1=num(peek(start_date));
let enddate1=num(peek(end_date));
load date($(stratdate1)+IterNo()-1) as startdate1
AutoGenerate 1
while IterNo()<= ($(enddate1) - $(stratdate1));
what is the error?
At first sight, you are missing the name of table
date:
LOAD * INLINE [
startdate, enddate
20/07/2015, 30/07/2015
];
please tell me other than that
Hi,
You need to check Peek()
when you say
let stratdate1=num(peek(start_date));
let enddate1=num(peek(end_date));
both are setting same value to variable and when execute below condition
while IterNo()<= ($(enddate1) - $(stratdate1));
It will be always IterNo()<=0 and because of it, you will get error.
try
let stratdate1=num(peek(start_date,1));
let enddate1=num(peek(end_date,-1));
Regards
Put single quotes aroung field name in peek(), like:
let stratdate1=num(peek('start_date'));
let enddate1=num(peek('end_date'));
I think you are missing noconcatenate while taking resident
LOAD * INLINE [
startdate, enddate
20/07/2015, 30/07/2015
];
date1:
noconcatenate
load date(Date#(startdate,'DD/MM/YYYY'),'MM/DD/YYYY') as start_date,
date(Date#(enddate,'DD/MM/YYYY'),'MM/DD/YYYY') as end_date
resident date;
drop table date;
Thanks actully how to check errors i am facing lot of problem
Thank you