Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use a variable value as a string in a Load instruction ?

Hi,

I'm trying to do a simple thing in a script (QlikView Desktop V9):
I've a variable :

SET V_UNKNOW_MARKET='Unknow' ;

then further in the script, I want to use this value :

LOAD
autonumber( [Region] & '/' & $(V_UNKNOW_MARKET)) as KEY
....

So it's quite simple, but with this syntax, QlikView understand the string 'Unknow' as a fieldname : Unknow.
I'm fighting with the syntax (using LET, SET, $(=) ...)

Do you know how to specify that the variable value is a constant string ?

Best regards

1 Solution

Accepted Solutions
stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

The dollar expansion will just replace the string literal in your script. You need to include the quotes for it:

LOAD
autonumber( [Region] & '/' & '$(V_UNKNOW_MARKET)') as KEY

Stephen

View solution in original post

3 Replies
stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

The dollar expansion will just replace the string literal in your script. You need to include the quotes for it:

LOAD
autonumber( [Region] & '/' & '$(V_UNKNOW_MARKET)') as KEY

Stephen

d_pranskus
Partner - Creator III
Partner - Creator III

Hi

Use folowing syntax

var = CHR(39) & 'Unknown' & CHR(39)

39 stands for ASCII code for single quote.

Cheers

Darius

Not applicable
Author

Thanks,
both solutions are working

Big Smile

Regards