Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
QV12 SR4
The following code worked great for at least a year until i had my computer reimaged (win10 reinstall) and i had to reinstall Qlikview. Now i get a syntax error that i can't fathom out.
The error occurs immediately after the line in red below. There is a file called dbCIPS - All - Apr 9 2018 09-47-14 AM.CSV in the vSPOPAdPromo folder.
Any ideas most welcome.
The syntax Error...
Unexpected token: '\\HAMMSTORE\Direct\Circulation\Data', expected one of: '(', ',', ':', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'OPERATOR_MULTIPLICATION', 'OPERATOR_DIVISION', ...
FOR each File in filelist >>>>>>\\HAMMSTORE\Direct\Circulation\Data<<<<<< ops\CIPS\Silverpop Database\dbCIPS - All*.CSV
The code...
//Path to AdPromo Files
LET vSPOPAdPromo = '\\' & '$(vHammstore)' & '\Direct\Circulation\Data ops\CIPS\Silverpop Database\';
FOR each File in filelist $(vSPOPAdPromo)dbCIPS - All*.CSV
Folder:
LOAD
'$(File)' as Name,
FileTime( '$(File)' ) as FileTime
autogenerate 1;
NEXT File
LatestAdPromoFile:
First 1
LOAD
Name,
SubField(Name,'\',SubStringCount(Name,'\')+1) as FileNameOnly,
FileTime,
1 as dummy
Resident Folder
Order By FileTime DESC;
DROP Table Folder;
LET vLatestAdPromoFile = Peek('FileNameOnly',0,'LatestAdPromoFile');
LET vLatestAdPromoFileWithPath = Peek('Name',0,'LatestAdPromoFile');
DROP Table LatestAdPromoFile;
May be try like this
FOR each File in filelist ('$(vSPOPAdPromo)*.CSV')
Folder:
LOAD
'$(File)' as Name,
FileTime( '$(File)' ) as FileTime
autogenerate 1;
NEXT File
change the folder Path and reload it.
Hope so its will be work . i am also facing same issue in some month ago .
No luck - same message i'm afraid
May be try like this
FOR each File in filelist ('$(vSPOPAdPromo)*.CSV')
Folder:
LOAD
'$(File)' as Name,
FileTime( '$(File)' ) as FileTime
autogenerate 1;
NEXT File
Wonderful - thank you - works perfectly