create a job to get the previous row salary for the current row.if there is no previous row exists for the current row,then the previous row salary should be displayed as null?
empid   salary   previoussalary
10      1000     null
20      2000     1000
30      3000     2000      
40      4000     3000

Answer Posted / indu

input file->transformer-> output file

in transformer declare stage variables as below:
current salaray
salary
previous salary

Initialize previous salary to null

current salary ---> previous salary
previous salary----> salary



In the output file derive the previous salary as

previousalary--->previous slary (stage variable)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the functionalities of link partitioner and link collector?

598


In Informatica,for the table I can find coreesponding dependent mappings.Likewise can I find the dependent jobs with all the information by using the table name

2013


What are some prerequisites for datastage?

617


What are the processing stages?

644


Difference between server jobs & parallel jobs?

655






Define Routines and their types?

621


EXPLAIN SCD

969


How do you generate sequence number in datastage?

625


What is a quality stage in datastage tool?

632


Differentiate between datastage and datastage tx?

599


What is a ds designer?

642


Differentiate between validated and Compiled in the Datastage?

646


Nls stands for what in datastage?

728


project Steps,hits, Project level HArd things,Solved methods?

1638


What steps should be taken to improve Datastage jobs?

641