BusinessObjects Board

Resolved: Command & Parameter

Hi,

I’m using Parameters in Commands for the first time (across SQL Server database).

I’ve created a parameter and tried to put it into my command.

SQL below for simplicity…

SELECT TOP 1 x.myField

FROM myData x 

WHERE x.myOtherField = ''' + {?My Parameter} + '''

However, while the parameter (string data type) has appeared in the report and I am prompted for it, I get no results even when there is data.

Is there something amiss with the way I’ve added the parameter into the Command?


milestyle (BOB member since 2016-11-17)

You just need to add parameter in single quotes. Try this.

WHERE x.myOtherField = ‘{?My Parameter}’


anil.ganga1 :us: (BOB member since 2007-07-04)

The one thing I didn’t try. Worked like a dream. Thank you.


milestyle (BOB member since 2016-11-17)