Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

lucarizziero
New Contributor

$ (dollar symbol) inside a variable script

Hello,

Inside the load script I need to use a variable containing an absolute path with a $ dollar symbol: it not runs, I think the problem is Qlik interprets it as a special symbol for returning a variable value.

For instance I try to run:

SET myvar = '\\server\datafiles$\qdstorage";

STORE mytable INTO $(myvar)\mytable.qvd;

no error is returned, but the script stop there.

Is there a way to mask the $ symbol in order to use it inside a string variable ?

Any other suggestion ?

Thanks for helping people.

Tags (2)
4 Replies
Not applicable

$ (dollar symbol) inside a variable script

I'm not sure if its a typo but you are quoting the SET with a single quote and end it with a double?

If it is just a typo, how about using chr(36) which is ASCII decimal for the $ sign? Perhaps:

SET myvar = '\\server\datafiles' & chr(36) & '\qdstorage';

STORE mytable INTO $(myvar)\mytable.qvd;

Regards,

Gordon

chriscammers
Contributor III

$ (dollar symbol) inside a variable script

Looks like you have a syntax error totally unrelated to the $

you have a double quote " at the end of the string. Replace it with a single quote ' 

lucarizziero
New Contributor

$ (dollar symbol) inside a variable script

Hi

I correct it:

SET myvar = '\\server\datafiles$\qdstorage';

STORE mytable INTO $(myvar)\mytable.qvd;

but the result is the same,

If I try:

STORE mytable INTO c:\server\datafile\qdstorage\mytable.qvd;

it runs correctly

MVP
MVP

$ (dollar symbol) inside a variable script

If I put your code snippet in a script an debug, it seems that your variable is correctly placed in:

STORE mytable INTO \\server\datafiles$\qdstorage\mytable.qvd

(so I don't see a problem with variable evaluation here):

Is this path really a valid path in your system? What if you just try the hardcoded full path like above? Does this work then?

Community Browser