Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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!!!!

Tags (1)
1 Solution

Accepted Solutions
MK_QSL
Not applicable

Re: Using Variables in Load Sentence

May be like below


vProceso= '31-01-2014';


and


'$(vProceso)' as Fecha,

7 Replies
Gysbert_Wassenaar
Not applicable

Re: Using Variables in Load Sentence

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
Not applicable

Re: Using Variables in Load Sentence

May be like below


vProceso= '31-01-2014';


and


'$(vProceso)' as Fecha,

Not applicable

Re: Using Variables in Load Sentence

Thanksssss...

MK_QSL
Not applicable

Re: Using Variables in Load Sentence

Hi gwassenaar

just want to know what is wrong in my answer?

I tried and it's working !

Gysbert_Wassenaar
Not applicable

Re: Using Variables in Load Sentence

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
Not applicable

Re: Using Variables in Load Sentence

Thanks... ! Have a nice weekend.

Gysbert_Wassenaar
Not applicable

Re: Using Variables in Load Sentence

You too!


talk is cheap, supply exceeds demand