Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hai,
if we have no data file means,dt is also generate a QVD file right...
but my requirement is, if there is no data in the file means,it shouldn't generate the QVD...
is there any condition for dt..
anyone help me..
thanks in advance.
Hi, Check this QVD_NAME: LOAD * frm file; if(noofrows('QVD_NAME')=0) then exit script; else store QVD_NAME into qvd; END
Hi, Check this QVD_NAME: LOAD * frm file; if(noofrows('QVD_NAME')=0) then exit script; else store QVD_NAME into qvd; END
Thanks..But if i give exit script...what hppnd to next file..how it will fetch..??
so i have to place the file atlast???aah.
Write Nested if statement then try
Last statement give the exist upto write the nested if
Hi Sindhu, Do you have a list of files to load into QVD and based on the data avaliablity in file, we need to add to the same qvd? Can you please explain you query?
Hi reddy,
i can't undrstnd ur post
yes vj,
i have list of files to load.in dt nly i need if there is no data file means it shouldn't generate the qvd.
and vj,ur post is helpful..but if we insert null records in qvd means we can write the expression..how to insert the null records in qvd.thanks in advance
Then u have use for loop on the files and then the above if condition for each File in filelist ('C:'&'\*.'&'.csv') // give corret file name QVD_NAME: LOAD * frm file; if(noofrows('QVD_NAME')=0) then next File; else store QVD_NAME into qvd; END next file Why do need to insert null records? generatlly we try not to have null records in Qlik tables. If the post is helpful mark it helpful and mark it answered, thnq
if i give next file means,will it take next file???..what should i give for dt..i am asking the word.
Hi Sindhu,
Try this you will get
A:
LOAD ID, Marks
FROM [Test1.xlsx] (ooxml, embedded labels, table is Sheet1);
B:
LOAD ID, Age
FROM [Test2.xlsx] (ooxml, embedded labels, table is Sheet1);
C:
LOAD A
FROM [Test3.xlsx] (ooxml, no labels, table is Sheet1);
let vA=NoOfRows('A');
let vB=NoOfRows('B');
let vC=NoOfRows('C');
if $(vA)>=1 THEN
store A into C:\Users\A.qvd;
ELSEIF $(vA)<1 THEN
drop table A;
ENDIF
if $(vB)>=1 THEN
store B into C:\Users\B.qvd;
ELSEIF $(vB)<1 THEN
drop table B;
ENDIF
if $(vC)>=1 THEN
store C into C:\Users\C.qvd;
ELSEIF $(vC)<1 THEN
drop table C;
ENDIF
regards,