Wednesday, 15 October 2014

DAY 5 Assignment answers


 Reading a source file with salary prefix $ , in the target the Sal column must store in number .
Source

EMPNO ENAME      JOB              MGR HIREDATE         SAL            DEPTNO
7369 SMITH            CLERK           7902 17-DEC-80        $800                20             
7499 ALLEN      SALESMAN        7698 20-FEB-81         $1600               30             
Target
EMPNO ENAME      JOB              MGR HIREDATE         SAL            DEPTNO
7369 SMITH            CLERK           7902 17-DEC-80        800                20             
7499 ALLEN      SALESMAN        7698 20-FEB-81         1600               30     
  1. Drag the source to mapping area and connect each port to an expression transformation.
  2. In expression transformation add a new col sal1 and make it as out put and sal as in put  only as shown in picture.
    expression
  3. In expression write the condition like this.
  4.  connect the required port to target.


Converting '$' symbol to 'RS." in sal column

Q24 The Emp table contains the salary and commission in USD, in the target the com and sal will converted to a given currency prefix ex: Rs.
 Source
EMPNO ENAME      JOB              MGR HIREDATE         SAL            DEPTNO 
7369 SMITH            CLERK           7902 17-DEC-80        $800                20              
7499 ALLEN      SALESMAN        7698 20-FEB-81         $1600               30              
Target
EMPNO ENAME      JOB              MGR HIREDATE         SAL                 DEPTNO 
7369 SMITH            CLERK           7902 17-DEC-80        Rs.800                20    
7499 ALLEN      SALESMAN        7698 20-FEB-81          RS.1600               30                        
  1. Drag the source and connect it to expression transformation
  2. In expression make a output port sal1 and make sal as input port only.
  3.  In sal1 write the condition as like bellow
  4.  Then send it to target.

No comments:

Post a Comment