DECODE
|
IIF
|
Decode can be used in Select statement
|
IIF cannot be used in a Select statement.
|
EXAMPLE:
DECODE(deptname,"SALES",1,0)
----If deptname is SALES then return 1 else return zero |
EXAMPLE:IIF( GRADE > 1, IIF( GRADE < 2, SAL1, IIF( GRADE
< 3, SAL2, IIF( GRADE < 4, SAL3, BONUS))), 0 )
----If the GRADE less than ONE then return zero else return SAL1 OR SAL2 OR SAL3 OR BONUS |
Decode gives better readablity to
users
|
IIF dosenot give good readablity
|
A blog where you can explore everything about Datawarehouse, OBIEE, Informatica, Power BI, QlikView, Hadoop, Oracle SQL-PLSQL, Cognos and much more....
Monday 10 September 2012
Difference between Decode and IIF in INFORMATICA
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment