BusinessObjects Board

use global variables in sql transform of Data services 4.2

Hello good afternoon, you can use global variables in “sql transform dataservices 4.2” because I have already tried brackets, keys, parentheses … if nothing and I do not recognize the global variable, I want to do this:

select * from TABLE where field = {$ variable_global}

I have tried in these ways:

  1. select * from TABLE where field = {$ variable_global}
  2. select * from TABLE where field = [$ variable_global]
  3. select * from TABLE where field = $ variable_global
  4. select * from TABLE where field = ‘[$ variable_global]’
  5. select * from TABLE where field = variable_global
  6. select * from TABLE where field = [BOBJ: $ variable_global]

and of all of them what I get is the error odbc data source error operation -BODI1130199, Help please.
I just want to know if you can use the global variables or not, what else can I do to pass the value of a variable?

Thank you very much…


denysl (BOB member since 2018-06-07)

You can use global variable in SQL transform but from what I can see you have a space between $ and variable name which is not allowed.

The below script should work:

select column1, column2, …, column3 from TABLE where field = {$variable_global} (if global variable is a alphanumeric)

select column1, column2, …, column3 from TABLE where field = [$variable_global] (if global variable is a numeric)

Regards. S


Shazin :india: (BOB member since 2011-07-19)