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

inputfile-->transformer-->outputfile




create stage variables 
current salary
previous salary(intialize this to null)




derive them as below:
current salary-->previous salary
previous salary---> salary




in the output file derive previous salary as below




previoussalary--->current salary

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to convert RGB Value to Hexadecimal values in datastage?

3455


What are system variables and sequencers in datastage

604


what is the custome stage in datastage? how can we impliment that one? plz tell me

1909


file having these input and we have to get 3 output using same job Input 1 1 1 2 3 4 4 4 o/p1 o/p2 o/p3 1 1 2 2 1 3 3 1 4 4 4

534


describe the Steps to confiure a Qlogic switch

1931






Differentiate between validated and Compiled in the Datastage?

639


What is data partitioning?

739


What is a folder? Difference types of stages?

626


What are the areas of application?

658


What are the job parameters?

703


What is datastage engine?

728


What are the repository tables in datastage?

819


Why do you need stage variables?

658


What is the difference between server job and parallel jobs?

662


How can we perform the 2nd time extraction of client database without accepting the data which is already loaded in first time extraction?

1695