Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

storing qvds

   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

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

weekstart(MakeDate(2015, 1, 20))


Regards,

Jagan.

View solution in original post

15 Replies
sushil353
Master II
Master II

change this:

  STORE week into $(file).qvd (qvd);

  DROP Table week;

HTH

Sushil

avinashelite

the DROP statement is wrong

DROP table week;

Anonymous
Not applicable
Author

Hi

I have tried that it is fine.But the problem is with no concatenate statement.

Anonymous
Not applicable
Author

yeah ! thats my mistake while posting .But store command should execute right ?

jagan
Luminary Alumni
Luminary Alumni

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;

Anonymous
Not applicable
Author

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

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

weekstart(MakeDate(2015, 1, 20))


Regards,

Jagan.

avinashelite

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

Anonymous
Not applicable
Author

Hi Jagan ,

Thanks for reply

Its not working .It is not giving weekstart and weekend values.so its not iterating in loop.

Thanks