Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
If you are a Qlik Insight Bot user, join this collaborative group: JOIN GROUP
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
Highlighted
MVP
MVP

Re: Using Variables in Load Sentence

May be like below


vProceso= '31-01-2014';


and


'$(vProceso)' as Fecha,

View solution in original post

7 Replies
Highlighted
MVP & Luminary
MVP & Luminary

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
Highlighted
MVP
MVP

Re: Using Variables in Load Sentence

May be like below


vProceso= '31-01-2014';


and


'$(vProceso)' as Fecha,

View solution in original post

Highlighted
Not applicable

Re: Using Variables in Load Sentence

Thanksssss...

Highlighted
MVP
MVP

Re: Using Variables in Load Sentence

Hi gwassenaar

just want to know what is wrong in my answer?

I tried and it's working !

Highlighted
MVP & Luminary
MVP & Luminary

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
Highlighted
MVP
MVP

Re: Using Variables in Load Sentence

Thanks... ! Have a nice weekend.

Highlighted
MVP & Luminary
MVP & Luminary

Re: Using Variables in Load Sentence

You too!


talk is cheap, supply exceeds demand