Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
PFA
I would like to concatenete QVD files and create a date field based on the QVD filename ,these files are sitting in one of the folders in my computer. Please below.
Load *,
Right(Subfield(Filename(),'.',-1),10) as Date
From [Folder\GENERAL_ACCT_MAST_TABLE_GH_*.QVD](QVD);
Write this way in load script for loading all qvds at once and by using filebasename create the datefield.
LOAD *
Date(Date#( SubField( FileBaseName() ,'_',-1),'YYYYMMDD'),'YYYYMMDD') as DateField
FROM
D:\Qcomm\GENERAL_ACCT_MAST_TABLE_*.qvd
(qvd);
Or
LOAD *
Date( SubField( FileBaseName() ,'_',-1),'YYYYMMDD') as DateField
FROM
D:\Qcomm\GENERAL_ACCT_MAST_TABLE_*.qvd
(qvd);
Also try this you have to write this for identifying file name as well
LOAD
*
SubField( FileBaseName() ,'_',-1) as DateField,
FileBaseName() as FileName
FROM
GENERAL_ACCT_MAST_TABLE_GH_*.qvd (qvd);