COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: nix10987 on 15 Aug 2011 05:56:14 AM

Title: Concat in Framework Manager
Post by: nix10987 on 15 Aug 2011 05:56:14 AM
Hi Guys,

I would like to ask for your help regading this issue. The issue happened when we tried to create new Query Subject or new Data Item containing concatenation of two columns in framework manager. Though it accepts the syntax CONCAT (str1, str2) and (str1||str2) it returns blank cells but when the columns are queried separately, it returns the expected values. The data type of those columns is VARCHAR and as we experienced, it didn't accept the function 'CAST' or 'CONVERT' to convert it into CHAR data type. We are only provided of the views and not the tables. And our database is DB2.

Should you need more details to analyze the problem further, please reply to my post.

Example scenario:
Column1-Column2
  01        532345
  02        673442
  03        123453

When i use the most basic approach, this is the result:

select concat(Table1.Column1, Table1.Column2) as Column3
from Table1

Result:

Column3
<blank>
<blank>
<blank>


Thanks in advance Guys! More power to you all!
Title: Re: Concat in Framework Manager
Post by: PRIT AMRIT on 15 Aug 2011 10:47:31 PM
Hope you have already tried something like below too?

Table1.Column1+'-'+Table1.Column2
Title: Re: Concat in Framework Manager
Post by: nix10987 on 15 Aug 2011 11:10:55 PM
hi prit!

what output would it create?
i am expecting it to be like:

Column3
01532345
02673442
03123453
Title: Re: Concat in Framework Manager
Post by: blom0344 on 16 Aug 2011 01:29:04 AM
Table1.Column1||Table1.Column2
though I would expect the concat function to work without a problem on varchar's
Title: Re: Concat in Framework Manager
Post by: PRIT AMRIT on 17 Aug 2011 05:02:08 AM
Quotehi prit!

what output would it create?
i am expecting it to be like:

It would give you: Column1-Column2
You can also define as Table1.Column1+Table1.Column2, would give you Column1Column2