Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
CGJA
Creator II
Creator II

Como unificar y cargar varios QVD

buenas tardes:

 

me gutaria saber como puedo unificar varios QVD's, ya que se generan 1 por dia. hay alguna forma de que se puedan cargar varios y con forme pasen lo dias se sigan cargando 

 

CGJA_0-1684193670383.png

 

Espero me pueda apoyar

 

1 Solution

Accepted Solutions
gfch2305
Contributor II
Contributor II

Hi,

This is very easy:  you can use the wild card asterisk * to load all QVDs files for years 2022 and 2023:

First create a load script with a table to load year 2022, name it for example lFN.
And later concatenate lFN to load year 2023. See below the script:

lFN:
Load * from [lib://QVDs/MX_DDV_Inventory_*2022.qvd] (qvd);

Concatenate(lFN)
Load * from [lib://QVDs/MX_DDV_Inventory_*2023.qvd] (qvd);

I recommend you first to create these QVDs files with date format YYYYMMDD, because it is better if you want to extract or load them by month.

View solution in original post

3 Replies
gfch2305
Contributor II
Contributor II

Hi,

This is very easy:  you can use the wild card asterisk * to load all QVDs files for years 2022 and 2023:

First create a load script with a table to load year 2022, name it for example lFN.
And later concatenate lFN to load year 2023. See below the script:

lFN:
Load * from [lib://QVDs/MX_DDV_Inventory_*2022.qvd] (qvd);

Concatenate(lFN)
Load * from [lib://QVDs/MX_DDV_Inventory_*2023.qvd] (qvd);

I recommend you first to create these QVDs files with date format YYYYMMDD, because it is better if you want to extract or load them by month.

CGJA
Creator II
Creator II
Author

buenas tardes:

 

hay alguna forma de que si en el QVD no tiene la fecha de creacion la pueda insertar cuando se hace la carga masiva??

 

 

Muchas garcias por la ayuda

gfch2305
Contributor II
Contributor II

It is more complex, but you can resolve it using these lines, please try this:

Let vfile='MX_DDV_Inventory_*.qvd';

lFN:
Load * Inline [Field99];

For Each vfile in FileList('[lib://QVDs/MX_DDV_Inventory_*.qvd]')

vdate=TextBetween(vfile,'MX_DDV_Inventory_','.qvd');
vcreatedate=MakeDate(Mid(vdate,5,4),Mid(vdate,1,2),Mid(vdate,3,2));

Concatenate
Load Field1,Field2,Field3,Date#('$(vcreatedate)') AS CreatedDate from '$(vfile)' (qvd);

Next vfile;

Drop Field Field99;