Pages

Sunday, March 17, 2013

There is a order_delivery table having record like this


ORDER_NO      ORDER_DATE      DELIVERY_DATE
   ---------                        ---------             --------
        2                        11-JAN-83          13-JAN-83
        3                         04-FEB-83        07-FEB-83
        1                         08-DEC-81        09-DEC-81

We have to calculate difference between order_date and delivery date in hours and send it to target.
o/p will be

 ORDER_NO   ORDER_DATE   DELIVERY_ DATE      DIFF_IN_HH
 ---------                     ---------                  ---------            ---------
     2                       11-JAN-83            13-JAN-83              48
     3                       04-FEB-83           07-FEB-83             72
     1                       08-DEC-81           09-DEC-81             24
These are the steps for achieving this scenario
 Don't forget to comment
  1. Connect one expression transformation next to SQF.
  2.      
  3. In expression create one out/put port “diff” and make it integer type.
  4. In that port write the condition like this and sent to target.

No comments:

Post a Comment