Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using Variables in Load Sentence

Hello Everyone, i have a problem, i want to use a variable into a load sentence.

I declare my variable in this way:

vProceso="31-01-2014";

And I want to use it in the following sentence:

LOAD

     vProceso as 'Fecha',

     Transacciones as Tran

from

     xxxxx;

Also I used $(vProceso) but I didn't get the result.

The table that I will wish to get is:

Fecha               Tran

'31-01-2014'     12345

Thanks for help me!!!!

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

May be like below


vProceso= '31-01-2014';


and


'$(vProceso)' as Fecha,

View solution in original post

7 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try it like this:

SET vProceso= 31-01-2014;

LOAD

     '$(vProceso)' as Fecha,

     Transacciones as Tran

from

     xxxxx;


talk is cheap, supply exceeds demand
MK_QSL
MVP
MVP

May be like below


vProceso= '31-01-2014';


and


'$(vProceso)' as Fecha,

Not applicable
Author

Thanksssss...

MK_QSL
MVP
MVP

Hi gwassenaar

just want to know what is wrong in my answer?

I tried and it's working !

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Yeah, it works. I think it's just better to be explicit about declaring variables by using LET or SET.


talk is cheap, supply exceeds demand
MK_QSL
MVP
MVP

Thanks... ! Have a nice weekend.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You too!


talk is cheap, supply exceeds demand