cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Passing Global Variable in Sql Object

Former Member
0 Likes
186

Hi

How can i pass my global variable into SQL object? I tried to pass it but then I tried to update the schema it giving me the error at varble

Please advise me

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

The Update schema is used only to get the structure for the Output.

Once you have a valid structure and the SQL Parses without any variables use the syntax for applying variables as in any Script within DI.

$GV_MyVar enclosed within square brackets will be replaced by Value of the variable.

$GV_MyVar enclosed within curly brackets will be replaced by Value of the variable enclosed in single quotes.

When the job runs, the variables will be replaced with values OR values with quotes. It is at this time, the SQL send to the database is validated for syntax.

Therefore, you will not know the validity of your SQL with Global Variables until you run the job.

Hope this helps!

Thanks & Regards

Tiji

Edited by: Tiji Mathew on May 8, 2009 3:40 PM

The actual syntax was being posted as a link. edited to make the text descriptive.

Former Member
0 Likes

Thanks for you reply ... But can you please tell me how can I check the sql script at debug point?

So I can see variable has been replace or not?

Jwalin

Former Member
0 Likes

You will see the SQL Submitted in the trace log.