Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
The below is my script .i have to generate qvds weekly .The logicc is fine but i have to store them to qvd by each week.
while i am storing into qvds it is throwing error table not found.Guide me if any thing wrong in the script .
Base:
LOAD*
FROM
let vstartdate = '20/01/2015';
let venddate ='20/04/2015';
let vweekstart =WeekStart('20/01/2015');
let vweekend =WeekStart('20/04/2015');
do while vweekstart<=vweekend
trace vweekstart=$(vweekstart);
week:
NoConcatenate load
* Resident Base
where SALES_DATE >= '$(vweekstart)' and SALES_DATE <= date('$(vweekend)');
let file = 'week' & date(Date#('$(vweekstart)'), 'YYYYMMDD');
trace file=$(file);
STORE week into '$(file)'.qvd (qvd);
DROP Table w;
let vweekstart=date(vweekstart+7);
loop;
Thanks
change this:
STORE week into $(file).qvd (qvd);
DROP Table week;
HTH
Sushil
the DROP statement is wrong
DROP table week;
Hi
I have tried that it is fine.But the problem is with no concatenate statement.
yeah ! thats my mistake while posting .But store command should execute right ?
Try this script
Base:
LOAD*
FROM
let vstartdate = '20/01/2015';
let venddate ='20/04/2015';
let vweekstart =WeekStart('20/01/2015');
let vweekend =WeekStart('20/04/2015');
do while vweekstart<=vweekend
trace vweekstart=$(vweekstart);
week:
NoConcatenate
load
* Resident Base
where SALES_DATE >= '$(vweekstart)' and SALES_DATE <= date('$(vweekend)');
let file = 'week' & date(Date#('$(vweekstart)'), 'YYYYMMDD') & '.qvd';
trace file=$(file);
STORE week into [$(file)];
DROP Table week;
let vweekstart=date(vweekstart+7);
loop;
hi
i tried the below function in text box but the result is very strange .
weekstart(20/01/2015)
o/p :12/25/1899 which is wrong.
Is there any thing went wrong in syntax.
Thanks
Hi,
Try like this
weekstart(MakeDate(2015, 1, 20))
Regards,
Jagan.
did you check for that particular week you have data or not?? if their is no data then it would cause probelm.
I dont think its because of the no concatenate ...please provide the sample data let s check
Hi Jagan ,
Thanks for reply
Its not working .It is not giving weekstart and weekend values.so its not iterating in loop.
Thanks