COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Prakash Bhai on 24 May 2011 10:10:49 AM

Title: How to get rid off
Post by: Prakash Bhai on 24 May 2011 10:10:49 AM
Hi All,

I have a column called Name. In that we have names along with the surname's. I need to extract the surname's and then I need to concatenate those with a space .The names are in this format
Peter,s
Robert,m
Allen,p

But the thing, There are commas in the front of the names.. Like
,,Peter,s

So I need to eliminate the commas in the front and need to pull the Surname which is not in a specified position(i.e Name is not in a fixed Length)

Regards,
Ram
Title: Re: How to get rid off
Post by: cognos123 on 24 May 2011 02:27:58 PM
Use below logic,

Querycalculation 1---- translate([query Item],'@,','@ ') ( it 'll work fine)
Querycalculation 2---- translate([Querycalculation 1],'@,,','@') ( not sure with this)