Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I'm wondering, is it possible to make a composite FROM statement in script?
For instance, instead of:
FROM
[C:/user/QlikView/test.xlsx]
I'd like something like:
FROM
'C:/user/QlikView/' & 'test.xlsx'
Is that in any way possible?
I'm asking, because I want to load specific files by using a variable that defines which files to load.
I understand something like that can be done with a macro, but doing it this way would be far simpler.
Thank you,
Ray
@FakeJupiter Yes, you can use the variable in middle of the path as well like below
FROM C:/Files/sales / $(salesDate).xlsx
or
FROM 'C:/Files/sales / $(salesDate).xlsx'
or
FROM [C:/Files/sales / $(salesDate).xlsx]
you can use for example :
Set PathFolder='C:\user\QlikView';
then
LOAD *
FROM
'$(PathFolder)\YOURFILE'
...
Thank you for your reply.
I understand that a variable can be used as a prefix, but is it possible to have variable in the middle of the load statement? For instance:
C:/Files/sales & $(salesDate) & .xlsx
@FakeJupiter Yes, you can use the variable in middle of the path as well like below
FROM C:/Files/sales / $(salesDate).xlsx
or
FROM 'C:/Files/sales / $(salesDate).xlsx'
or
FROM [C:/Files/sales / $(salesDate).xlsx]
Thanks!