Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to load qvd with latest loaded .
i am executing the below script
LOAD *
FROM [..\02_QvdGenerators\QvdGenerated\Qvd_By_Month\.qvd](qvd)
where QVDCreateTime =Max(QVDCreateTime);
i am getting correct time of qvd creation,
I need to pull qvd with latest creation.
Thnanks
Hi Rgv,
Try this code. This will take Latest QVD and Load it.
Let vQVDFolderPath='C:\Users\SP\Documents\QVD'; //Just Change your QVDPath
For Each File in FileList(vQVDFolderPath& '\*.qvd')
QVDDetails:
First 1
Load FileName() as QVDFileName,
QvdCreateTime('$(File)') as QVDCreateTime,
SubField(SubField('$(File)','\',-1),'.',1) as QVDTableName
From [$(File)] (qvd);
Next File
NoConcatenate
QVDOrder:
LOAD QVDFileName,QVDCreateTime,QVDTableName Resident QVDDetails Order by QVDCreateTime;
Let vQVDLoadFile=Peek('QVDFileName',-1);
Let vQVDTableName=Peek('QVDTableName',-1);
DROP Table QVDOrder;
[$(vQVDTableName)]:
LOAD * From [$(vQVDFolderPath)\$(vQVDLoadFile)](qvd);
Hi,
Try this..
If you have the Field QVDCreateTime in your QVD, you can create the variable for Maximum create Time. Like
MaxCreateTime:
Load Max(QVDCreateTime) as MaxQVDCreatetime From QVDSource;
vMaxQVDCreateTime=Peek('MaxQVDCreateTime');
Drop Table MaxCreateTime;
Load * FROM QVDSource where QVDCreateTime>='$(vMaxQVDCreateTime)';
Hi
i need to load the qvd which has maxCreationtime .
i think i have problemm in the extension. i am using
OAD *
FROM [..\02_QvdGenerators\QvdGenerated\Qvd_By_Month\.qvd](qvd).
Is it the correct way
Can you clarify, Do you need which qvd is latest based on QVDCreation Time?,
if so, check your previous thread Incremental load with qvd's
Or You want to load the data based on existing QVDCreationTime Field?
It would be good, if you give more specific.
I need qvd's loaded latest .
My qvd name format is Jan 2015 etc..
for example jan 2015 is executed at 20/12/2015 10:15:22a.m
i want to load jan 2015 qvd as of now it is latest
Hi Rgv,
Try this code. This will take Latest QVD and Load it.
Let vQVDFolderPath='C:\Users\SP\Documents\QVD'; //Just Change your QVDPath
For Each File in FileList(vQVDFolderPath& '\*.qvd')
QVDDetails:
First 1
Load FileName() as QVDFileName,
QvdCreateTime('$(File)') as QVDCreateTime,
SubField(SubField('$(File)','\',-1),'.',1) as QVDTableName
From [$(File)] (qvd);
Next File
NoConcatenate
QVDOrder:
LOAD QVDFileName,QVDCreateTime,QVDTableName Resident QVDDetails Order by QVDCreateTime;
Let vQVDLoadFile=Peek('QVDFileName',-1);
Let vQVDTableName=Peek('QVDTableName',-1);
DROP Table QVDOrder;
[$(vQVDTableName)]:
LOAD * From [$(vQVDFolderPath)\$(vQVDLoadFile)](qvd);
Thank alot settu !! Its working