If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Converting decimal to string

Started by asmfloyd, 31 Jul 2019 09:28:51 PM

Previous topic - Next topic

asmfloyd

Hello,
  I have a decimal field in the database. I need to display the filed based on a condition as below:
     IF (FUND='A') then (VALUE1) else ('NA'). It works if I keep NULL instead of 'NA'.

I used to_char( and cast  function as below. But they are giving Oracle invalid number error. How should I move head?

Using cast:   IF (FUND='A') then (cast ((VALUE1),varchar(20))) else ('NA')
Using char(: IF (FUND='A') then (to_char(VALUE1)) else ('NA')

 

Thanks,

BigChris

Are you doing anything with that field after you put NA into it, for example have you got a total at the bottom of your report?

asmfloyd

No. Just showing detail level data only in the report. No summary totals are needed.

asmfloyd

I had to change the 'Total' function of that column to minimum. It is working as per my needs. Thank you BigChris for the inputs.