Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Qvd manipulation

Hi everyone,

I have two questions.

1) Is it possible to prefix a qvd file when you store it??

   For example I have an Events table and i want to store it a qvd as (current_week)_Events.qvd

   Is that possible in any way??

2) After I do that I want to read from all the prefixed qvds and store the data in another separate table.

   Something like

   Load *,

            (current_week) as week <---- this week should be unique for every qvd

   from *_Events.qvd

  

   did not work for me

Any help??

Regards

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Qvd manipulation

Maybe something like this:

Let vWeek = Week(today());

store TABLE into $(vWeek)_Events.qvd (qvd);

LOAD *,

  subfield(FileName(),'_',1) as Week

from *_Events.qvd (qvd);

2 Replies
MVP
MVP

Re: Qvd manipulation

Maybe something like this:

Let vWeek = Week(today());

store TABLE into $(vWeek)_Events.qvd (qvd);

LOAD *,

  subfield(FileName(),'_',1) as Week

from *_Events.qvd (qvd);

carlos_reyes_qv
Valued Contributor

Re: Qvd manipulation

1) You can, what I usually do is that I create a variable that changes its value in each one of the cycles that are executed by a FOR. Something like this:

FOR EACH Date IN $(ListaFechas)

LET QVD_SALES_HDR = 'SALES_HDR_' & Date( Date, 'YYYYMM');

STORE $(QVD_SALES_HDR) INTO $(QVD_SALES_HDR).qvd;

NEXT

2) You can do that too. I think your sintaxis should work, although I never create prefixed qvds, I always use postfix.

Community Browser