Sunday, 3 March 2013

Handling NULL in the OBIEE 10g


Hi,
I have created the new logical column with
sum(column_name)/sum(count column name)
i enabled
prevent_divide_by_zero=yes
enable_db_hints=yes
in the NQSconfig.INI
When i create a column rpd handles with nullif(sum(count column name),0)
it means again if the column value returns null then replace with '0'.
In answers i have concate a string to the new logical column.....If the column returns null then it is only showing that string..
But my concern is i want to show '0' if i dont get any result .
Solution:ifnull(new logical column,0) ......Then concatenate the value to string.


Saturday, 2 March 2013

Write Back In OBIEE 10g

What is Write Back option?
Write back is the ability to enter or update values directly into a report and have those values stored directly in to the database. In order to implement this feature in OBIEE 10g we have to make some changes in the repository as well as in the presentation services layers. 

Lets discuss the scenario with the write back feature......................................
I have created a report with 5 write back columns, 3 columns are var char data type, 2 columns are integer data type.
Must follow the tips:
  • Use a different connection pool for the write back option.
  • Only table view support the write back feature.
  • Follow the template format and the template have either insert or update command.
  • Follow the column order in the template.
  • Assign the exact column numbers which is exist in the report.
  • Place the write back template C:/oracleBI/web/msgdb/custommessages/writeback1.xml.
  • The template should be match with the which is given in the answers.
Errors while dealing with write back Feature:
Contact SQL Administrator Error:
  • All the write back column names and the column numbers should be exist in the template
Web page Invalid input type:
  • The values datatype entered in the write back columns should be match with the column data type.
  • Don't left the any numeric column as blank in the report best practice from oracle.
Sample Write back Template : WriteBack.xml
<?xml version="1.0" encoding="utf-8" ?>
<WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
<WebMessageTable lang="en-us" system="WriteBack" table="Messages">
<WebMessage name="WriteBack">
<XML>
<writeBack connectionPool="Connection Pool">
<update>UPDATE db_summary SET comments='@{c1}' WHERE location='@{c2}'</update>
<insert>INSERT INTO db_summary {comments} VALUES '@{c1}' </insert>
</writeBack>
</XML>
Let’s see, the step wise implementation of this feature.