Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
jpjust
Specialist
Specialist

Script Issue

All,

I have a very simple script as below and not returning any data. I can see log files under ServerLogFolder/Script 

for each FoundFile in filelist( 'lib://ServerLogFolder/Script ' & '\*.log' )

Load
left(Right('$(FoundFile)', len('$(FoundFile)') -index('$(FoundFile)','/',-1)),36) as App_ID
,Replace(@1,'/','\') as QVD_FILES
,FileTime('$(FoundFile)') as ReloadTime
FROM '$(FoundFile)'(txt, utf8, no labels, delimiter is ',', msq)
where Upper(@1) like '*.QVD*';next FoundFile

Can some one please help me to identify the cause for this issue?

Thanks

4 Replies
Vegar
MVP
MVP

Upper(@1) like '*.QVD*'  could be your issue.

Try using wildmatch instead.

WildMatch(@1, '*.QVD*')

jpjust
Specialist
Specialist
Author

Still don't work.

for each FoundFile in filelist( 'lib://ServerLogFolder/Script ' & '\*.log' )

Load
left(Right('$(FoundFile)', len('$(FoundFile)') -index('$(FoundFile)','/',-1)),36) as App_ID
,Replace(@1,'/','\') as QVD_FILES
,FileTime('$(FoundFile)') as ReloadTime
FROM '$(FoundFile)'(txt, utf8, no labels, delimiter is ',', msq)
where WildMatch(@1, '*.QVD*');
//where Upper(@1) like '*.QVD*';

next FoundFile;

Attached is the screen shot of the log files under the script folder.

ThanksScriptLogs.jpg

Vegar
MVP
MVP

You need to figure out where the issue lies. What happens if you load without the where statement. Do you get any output then?

for each FoundFile in filelist( 'lib://ServerLogFolder/Script ' & '\*.log' )

Load
left(Right('$(FoundFile)', len('$(FoundFile)') -index('$(FoundFile)','/',-1)),36) as App_ID
,Replace(@1,'/','\') as QVD_FILES
,FileTime('$(FoundFile)') as ReloadTime
FROM '$(FoundFile)'(txt, utf8, no labels, delimiter is ',', msq)
;

next FoundFile;

jpjust
Specialist
Specialist
Author

Well, I did tried with out the where condition and still no records.

Will do some additional debugging..