Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
Can I generate a QVD file that contains FileName of data files i am loading. And without using macro?
I usually do something like this in the load script.
Table:
LOAD yourFields,
'SourceFileName' as [Source File Name]
FROM
SourceFile....
Store Table into ....
This would add the SourceFileName to all the data and can then be used to filter in your original application.
Not sure if this is what you wanted to do, but I hope it helps.
Best,
S
Hi @sunindia,
that is completely correct.
I would just like to add a common pitfall - that I, for my part, stumbled into a few times:
Just using, like "LOAD ... FROM;" without any further details won't work.
You have to specify what type of file you are loading. The easiest way to get these is to load something from that file (using the wizard, don't worry about details, just open the wizard and click on the file, make sure QlikView recognizes the file_type and then click "Finish"), delete the "sheet is" part, that is not needed for the filename, and then build the LOAD like sunindia proposed.
Best regards,
DataNibbler
I have hundred of files in folder and I don't wish to write file names
For this you could use file-functions like filename() - there are many more:
table:
Load *, filebasename() as Source From xyz;
- Marcus
I used distinct without loading other fields and I got one row for each file