COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: ry1633 on 23 May 2016 10:10:20 AM

Title: concatentation - allowable characters
Post by: ry1633 on 23 May 2016 10:10:20 AM
Are there certain allowable characters in a Cognos concatenation for a query subject or item?   I'm trying to do reference number concat of a few different collumns:  Part, Section, and Subsection that would be like this:

Example:  110.2(a)
•   part=110
•   section=2
•   subsection1=a

But Cognos seems to not like the parentheses.

[PART] || '.' || [SECTION] || '(' || [SUBSECTION1] || ')' ||
Title: Re: concatentation - allowable characters
Post by: bus_pass_man on 23 May 2016 07:02:25 PM
Telling us the error message might be helpful.

My first guess is that it is complaining about the data types  of the query items which you are trying to concatenate. 

You might need to cast the numeric data type query items into strings.
Title: Re: concatentation - allowable characters
Post by: ry1633 on 26 May 2016 09:17:38 AM
Well,  FM wouldn't ever give me a specific error message beyond just a parsing error with no notes.    I thought it was the paratheses,  but I think it was the order of the close || marks
Title: Re: concatentation - allowable characters
Post by: Lynn on 26 May 2016 09:41:23 AM
I think the two || symbols at the end would cause a parsing error because it is a concatenation operator but you don't have anything specified after that to concatenate. Of course the data type is also important as bus pass man explained.