COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: johny.cbi on 22 Dec 2008 08:19:57 AM

Title: functions
Post by: johny.cbi on 22 Dec 2008 08:19:57 AM
I need to say in my report show me zip code >50000 and <55000

so i need the zip code to be a number

the zip code is a varchar i believe, text

can I use cast function or to_number function?

Title: Re: functions
Post by: blom0344 on 22 Dec 2008 09:15:53 AM
to_number is specific for Oracle. If you can use a Cognos function, then this should be the one to go for.
So, use the cast construction from the set of cognos functions..
Title: Re: functions
Post by: johny.cbi on 22 Dec 2008 09:48:08 AM

I have a ZIP code item like this 
[Business View].[First Primary LIVE].[Zip Code],
my Data Base is Oracle, cognos 8.1v

could you please give me the example from the above Zip code item
Title: Re: functions
Post by: blom0344 on 22 Dec 2008 10:22:55 AM
When in Report Studio press F1 then search for 'using the expression editor' on how to use the Cast function..
Title: Re: functions
Post by: JGirl on 26 Dec 2008 07:49:38 AM
Have you tried just using [Business View].[First Primary LIVE].[Zip Code] between '50000' and '55000' without casting it at all?

J