Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good afternoon all,
I have to store an amount of qvd's into a directory. A few things amazed me:
1. I can not use relative path. The emphasis here might be on 'I'. Maybe there is a way, but I haven't found it;
2. In an attempt to circumvent this problem I tried to SET a path variable. This didn't work; the script crashed.
Does anyone have a solution for this?
Thanks in advance,
Rob
Well, I think you need something like
$(vcQvdPath)
to reference the variable, in total
STORE TableName INTO $(vcQvdPath)TableName.qvd
(no Concatenation symbol needed here).
You could also look into the directory statement.
I usally use a variable to store the path and the reuse this variable in the STORE statement full qualified path.
This is what I tried:
SET vcQvdPath = I:\Qlikview\Qvds\
or
SET vcQvdPath = 'I:\Qlikview\Qvds\'
then I declared
STORE TableName INTO vcQvdPath & TableName.qvd
The script ran, but no qvd appeared in the directory.
What did I do wrong?
Well, I think you need something like
$(vcQvdPath)
to reference the variable, in total
STORE TableName INTO $(vcQvdPath)TableName.qvd
(no Concatenation symbol needed here).
You could also look into the directory statement.
Brilliant! Thanks.
Using the right syntax takes some practising for me 🙂
If I understand what you mean by relative paths, I use them for my QVDs and almost everything else, most commonly like this:
DIRECTORY ..\..\server\masterData\QVD;
[Something]:
LOAD SomeField
FROM SomeFile.qvd (QVD)
;
But this also works fine and is equivalent:
[Something]:
LOAD SomeField
FROM ..\..\server\masterData\QVD\SomeFile.qvd (QVD)
;
I agree that you should be using relative paths.