Discussion Board for collaboration on QlikView Scripting.
Hi to all,
Is possible to generate a loop of concatenate, that concatenate the content of some qvd’s files?
Will follow an example:
Suppose that I have a field in my database that is:
And suppose that I have 4 qvd’s file:
I need to find a way to generate an automatic iteration that generate code like the one below:
Can you give me an example of concatenate in a loop?
Set NFiles = 4; for i = 1 to $(NFiles-1)
In this sample there are 4 files. In my final qvw will be more than 100 qvd that will be concatenated.
So I need to find a script that generate automatically the concatenate of those files.
Thank you for supporting me.
Go to Solution.
That sounds like a very bad idea. Your table will look like this:
A B C D
3 - - -
4 - - -
1 - - -
- 1 - -
- 5 - -
- 2 - -
- - 3 -
- - 1 -
- - 6 -
- - - 2
- - - 1
If that's really what you want try this:
LOAD * INLINE ;
FOR EACH vFile in FileList('C:\QVDATA\*.qvd')
LOAD * FROM [$(vFile)] (qvd);
Hi Gysbert ,
thanks a lot, works perfectly.
I know that is a bad idea but i think is the only one possibility to concatenate qvd's.
1. The loading will be from one table that contain all the datas. (qv_file: LOAD * FROM Table where code = var)
2. With multi-tasking scheduling we run many task of the same qv_file with a parameter (variable).
(in a command line will be: run qv_file /vvar=001,
in another command line will be: run qv_file /vvar=002
In this way we got all the data filtered with this variable, to have many qvd's that are called with a name of such variable. (qv_file_001.qvd, qv_file_002.qvd......)
Like that we can run so many task of the same file in parallel (that is not possible to have the same parallelism using QV server)
After that, in the front end all the qvd's will be concatenated together! And that was my question.
Do you have another idea for such topic, and about the concatenate? Your idea work so good, but maybe is not good with many datas.
Thank you, have a nice day!
You can use the special caracter * like this