Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use a variable in sql select

I set a variable at the beginning of my script, and I would like to assign this variable to every row of data in my sql select statement.

The variable is called vTmp and this is how I am trying to incorporate it but it is not working.

LOAN:

SQL SELECT

    "Account_Phone",

    "Account_Type",

    "Risk_Raiting",

    $(vTmp)

FROM "database".dbo."table";

Is this technique possible?

Thanks

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You may need to use  Preceding Load something like this :

LOAN:

Load

     *

    $(vTmp)

;

SQL SELECT

    "Account_Phone",

    "Account_Type",

    "Risk_Raiting",

    $(vTmp)

FROM "database".dbo."table";

View solution in original post

3 Replies
maxgro
MVP
MVP

maybe

'$(vTmp)'


what's your variable?

Anonymous
Not applicable
Author

You may need to use  Preceding Load something like this :

LOAN:

Load

     *

    $(vTmp)

;

SQL SELECT

    "Account_Phone",

    "Account_Type",

    "Risk_Raiting",

    $(vTmp)

FROM "database".dbo."table";

Clever_Anjos
Employee
Employee

It´s possible, what is the content of your variable?