COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: bpothier on 09 Jun 2014 12:09:22 PM

Title: Query Subject Calculation
Post by: bpothier on 09 Jun 2014 12:09:22 PM
This is probably so simple but I can;t seem to wrap my head around it.

I have data that will be coming in like this  CA123456 - always CA then 6 numbers
I woudl like to do a calculation to convert it to E012345

Basically change the CA to an E on all the records coming in

Can anyone help

Thanks

Title: Re: Query Subject Calculation
Post by: Francis aka khayman on 09 Jun 2014 08:44:16 PM
substring([data,2)
Title: Re: Query Subject Calculation
Post by: MFGF on 10 Jun 2014 04:55:37 AM
Quote from: bpothier on 09 Jun 2014 12:09:22 PM
This is probably so simple but I can;t seem to wrap my head around it.

I have data that will be coming in like this  CA123456 - always CA then 6 numbers
I woudl like to do a calculation to convert it to E012345

Basically change the CA to an E on all the records coming in

Can anyone help

Thanks

You need an expression something like:

'E' + substring([your data item],3,6)

Cheers!

MF.
Title: Re: Query Subject Calculation
Post by: bpothier on 10 Jun 2014 09:47:24 AM
Thanks Everyone. You guys always ome through