Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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

1 Solution

Accepted Solutions
swuehl
MVP
MVP

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);

View solution in original post

2 Replies
swuehl
MVP
MVP

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
Partner - Specialist
Partner - Specialist

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.