Skip to main content
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

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

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

You too!


talk is cheap, supply exceeds demand