Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
Hi,
you can simply write:
Set Errormode = 0 ;
in your script.. it will ignor error if script will not find sep qvd.
HTH
Sushil
pls tell me how to write script for this load qvds
if (FileSize('201409.qvd')>0) then
trace load;
LOAD *
FROM 201409.qvd (qvd);
ELSE
trace skip;
end if;
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
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;
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.
hy, try this:
for Each file in FileList ('Your Directory\*.qvd')
Temp:
load
*
from $(file) (qvd) ;
next file;
best regards