Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi We are Loading QVDs from Database based on the below code
if not isnull(QVDCreateTime('$(vQVDPath)IDS_$(tableName).qvd')) then
LoadTime:
Load Max(LastModifiedDate) as LastModifiedDate // Or max(CreatedDate)
From $(vQVDPath)IDS_$(tableName).qvd (qvd);
Let vLastExecTime = timestamp(peek('LastModifiedDate',0,'LoadTime'),'YYYY-MM-DD hh:mm:ss');
//Let LastModifiedTimestamp = '$(vLastExecTime)';
Drop Table LoadTime;
ELSE
Call FullTableLoad(tableName);
EXIT SUB;
end if;
According to this if QVD is not AVailable on that particular path its doing a full load,
now what we need is if QVD is Availbale and contains 0 records then again it has do a full load
we need to write and if condition here. please help me
Try this
if not isnull(QVDCreateTime('$(vQVDPath)IDS_$(tableName).qvd')) or (exists('$(vQVDPath)IDS_$(tableName).qvd') and QvdNoOfRecords('$(vQVDPath)IDS_$(tableName).qvd')=0) ) then
LoadTime:
Load Max(LastModifiedDate) as LastModifiedDate // Or max(CreatedDate)
From $(vQVDPath)IDS_$(tableName).qvd (qvd);
Let vLastExecTime = timestamp(peek('LastModifiedDate',0,'LoadTime'),'YYYY-MM-DD hh:mm:ss');
//Let LastModifiedTimestamp = '$(vLastExecTime)';
Drop Table LoadTime;
ELSE
Call FullTableLoad(tableName);
EXIT SUB;
end if;
hope this helps
Use row count function in your iff
some thing like this
Let RowCount= NoOfRows('ActionCheck');
If '$(RowCount)' <> '0' THEN
Here Action check is a table.
You can call the qvd and do full reload and then check for the NoOf Rows
Try this
if not isnull(QVDCreateTime('$(vQVDPath)IDS_$(tableName).qvd')) or (exists('$(vQVDPath)IDS_$(tableName).qvd') and QvdNoOfRecords('$(vQVDPath)IDS_$(tableName).qvd')=0) ) then
LoadTime:
Load Max(LastModifiedDate) as LastModifiedDate // Or max(CreatedDate)
From $(vQVDPath)IDS_$(tableName).qvd (qvd);
Let vLastExecTime = timestamp(peek('LastModifiedDate',0,'LoadTime'),'YYYY-MM-DD hh:mm:ss');
//Let LastModifiedTimestamp = '$(vLastExecTime)';
Drop Table LoadTime;
ELSE
Call FullTableLoad(tableName);
EXIT SUB;
end if;
hope this helps
Hi Sunil,
Thanks for the Reply ,
Yes It Will work .Thanks a Lot
Regards
Abi