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

 

Decode from 1 as Domestic and 2 as International in Cognos 8 with DB2 as DB.

Started by valavalark, 25 Jul 2006 10:29:00 AM

Previous topic - Next topic

valavalark

Hi All,

I have a column in a table TYPE with a data type as integer and it has values only 0,1 and 2. but I need to show "Domestic" in the place of 1 and "International" in the place of 2 and ignore 0. the database is DB2. can you please let me know how to go about this.

I tried this way

IF (TYPE=1) THEN (11) ELSE (22) -- THIS IS WORKING AS I AM NOT USING ANY STRING.

IF (TYPE=1) THEN ('DOMESTIC') ELSE ('INTERNATIONAL') - THIS IS THROWING AN ERROR AS I AM PASSING A STRING TO AN INTEGER COLUMN.

PLEASE HELP, HOW TO GO ABOUT THIS

Your help is greatly appreciated

Thanks,
-RK