Skip to Content

@variable('DBUSER') returns a value is surrounded by single quotes

Hello experts,

I am using @Variable('DBUSER' [DELIMITER = no_quote] ) but still the return value has single quote in generated sql statement.

SELECT DISTINCT

'MYDB'.FXN_CUSTOM_FUNCTION('08/19/2015 16:58:18')

FROM

MYTABLE

In above example MYDB is the output of @variable('DBUSER'), it is surrounded by single quotes and hence i am getting an error saying

[Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot call methods on varchar.

Can any one tell me how to get out of single quotes here.

Thanks ,

Deepa.

0
Add a comment
10|10000 characters needed characters exceeded

author's profile photo Former Member
Former Member Aug 19, 2015 at 11:37 AM

0

80

Actions

2 Answers

AMIT KUMAR
Aug 19, 2015 at 11:44 AM
0

Hi,

Try with set the delimiter value to No in the PRM file and see if it will work.

Check section 3.4.15.25 DELIMIT_IDENTIFIERS page 120.

http://help.sap.com/businessobject/product_guides/boexir4/en/xi4sp11_universe_design_tool_en.pdf

Amit

Add a comment
10|10000 characters needed characters exceeded

  • Former Member Jacqueline Rahn

    Hi Jacqueline,

    Yes, @Variable is a string variable and BO has provided us an alternative way (like setting DELIMIT_IDENTIFIERS) to use it as non-quoted string for different purpose (as a schema name in my example above). But unfortunately these workarounds are not working for me.

    Thanks,

    Deepa.

Jacqueline Rahn
Aug 25, 2015 at 02:49 PM
0

Hi Deepa, Yes, I see that in the IDT guide chapter 18 For syntax @Variable('' [, DELIMITER=default | no_quote] ) must be in single quotes. and DBUSER Should be used as ..... @Variable('DBUSER' [,DELIMITER=no_quote]) check with the coma, Also is this a multisource unvierse? where are you using the @Variable? in the BEGIN_SQL OR END_SQL? IN JOIN? Calculated column, derived table?

Add a comment
10|10000 characters needed characters exceeded