COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: kkirnbauer on 29 Nov 2016 02:37:56 AM

Title: Set Input Parameter UPPERCASE
Post by: kkirnbauer on 29 Nov 2016 02:37:56 AM
Hi,

in Cognos 10.2.2 i do native SQL Statements und i want to use Macro Prompts therefore. My Problem is, that the input Parameter should be uppercase. Is there any chance to achieve that?

I'm using the Prompt Macro like this:

select * from test
where 1=1 and #prompt('Artikelnummer','string',' ',' and koartn =')#

All fields in koartn are Uppercase, so i want the #prompt field also in uppercase.

Thanks

kind regards

Title: Re: Set Input Parameter UPPERCASE
Post by: hespora on 29 Nov 2016 04:48:54 AM
Moin,


why would you have part of the select statemet inside your prompt macro, rather than outside? Let alone that the way you have it currently provides to "and"'s to the statment


select * from test
where 1=1 and koartn = #toupper(prompt('Artikelnummer','string',' '))#


Plus, if koartn accepts strings, you probably need single quotes, right? #sq(toupper(prompt('Artikelnummer','string',' ')))#