Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

loading qvd?

Here i have a qvd up to Aug  month(creating monthly qvds)  but i dont know whether qvd is avaliable for  Sep month

here i want write expression for like

load all qvds and if Sep qvd is avaliable then  load  otherwise leave it?

1 Solution

Accepted Solutions
sushil353
Master II
Master II

you need to write for loop for this:

first of all get the values of each month in a table say monthtable

then say want to load data for 12 months

SET Errormode = 0;

for i=0 to 11

LET monthtable= peek('Month',$(i),'monthtable')

load

*

from Table_$(monthtable).qvd(qvd);

HTH

Sushil

View solution in original post

7 Replies
sushil353
Master II
Master II

Hi,

you can simply write:

Set Errormode = 0 ;

in your script.. it will ignor error if script will not find sep qvd.

HTH

Sushil

Anonymous
Not applicable
Author

pls tell me how to write script for this load qvds

maxgro
MVP
MVP

if (FileSize('201409.qvd')>0) then

  trace load;

  LOAD *

  FROM 201409.qvd (qvd);

ELSE

  trace skip;

end if;

sushil353
Master II
Master II

you need to write for loop for this:

first of all get the values of each month in a table say monthtable

then say want to load data for 12 months

SET Errormode = 0;

for i=0 to 11

LET monthtable= peek('Month',$(i),'monthtable')

load

*

from Table_$(monthtable).qvd(qvd);

HTH

Sushil

fkeuroglian
Partner - Master
Partner - Master

Hi, see this hope helps

IF (isNull(qvdCreateTime('../2_QVD/201409.qvd'))) THEN

  LOAD *

  FROM 201409.qvd (qvd);

ELSE

  Let MiMensaje = '1' & ' ERROR' & ' 201409.qvd' ;

  trace $(MiMensaje);

END IF;

shane_spencer
Specialist
Specialist

Can't you simply use * to load all QVD's that are present in the directory rather than naming them specifically? If September is there it will be load, if it isn't obviously it won't.

ppmc
Partner - Contributor II
Partner - Contributor II

hy, try this:

for Each file in FileList ('Your Directory\*.qvd')

Temp:

load

*

from $(file) (qvd) ;

next file;

best regards