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

Insert a CASE Statement into a Concantenated Data Item? (Example inside)

Started by cabaynes, 01 Jul 2011 10:10:55 PM

Previous topic - Next topic

cabaynes

I have a data item in my query that looks like this:

[Name]||[SerialNumber]||[Status]

I would like to add a case statement to the end of the concantenation so the data item is then:

[Name]||[SerialNumber]||[Status]|| CASE when ... then ... when ... then ... else ... end

But when I attempt it I just get an error. I surrount the case statement with brackets, but I don't know what the proper code is. What do I need to surround the case statment with to get it to work? I have tried surrounding it with both [  ] and {  } brackets, but neither work.

Can anyone help on this holiday weekend?

Thank you and Happy 4th!

Charles

mvn.balu

HI
please try this formate i think u wil get

[gosales_goretailers].[Products].[Product line]|| ' '|| (case
when ( [Order month] between 1 and 8) then ([Retailer name]) else(' ') end)

cabaynes

Wow, I feel dumb! Surrounding the case statement with parentheses worked!

Thank you!  :) :) :)