Wednesday, January 2, 2013

Change Initial character of a Column’s Data in OBIEE


Let’s say, your database containing the data in small letters for one of the columns.
Now, requirement is like, need to capitalize the first character of every value in that column.
One approach is: If you are using Oracle database, you can use Initcap function with Evaluate function in obiee. Actually, Initcap function in oracle capitalizes every character which comes after space along with 1st character.
You need to write functionality as shown below, to achieve your requirement.
Syntax:  EVALUATE(‘INITCAP(%1)‘, Table.ColumnName)
Ex : EVALUATE(‘INITCAP(%1)‘, Products.”Prod Category”)
If it’s not oracle database, you find equivalent and appropriate function for Initcap for your own database and write the same in Evaluate function
Another Approach is:  Write the following functionality in one column of answers
upper(SUBSTRING(Products.”Prod Subcategory” FROM 1 FOR 1)) ||SUBSTRING(Products.”Prod Subcategory” FROM 2)
But this shows only first letter as capital, and remaining all in smaller case.
You can write these functionalities in rpd also… and make use those columns directly in Answers.
You can find my answer in forums for same question here …