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

declare stage varibales
current salary
previous salary  and initialize the previous salary to null

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

in the output file derive previousalary as
previoussalary-->current salary (stage variable)

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In a batch if a job fails in between and you want to restart the batch from that particular job and not from the scratch then what will you do?

608


How to read multiple files using a single datastage job if files have the same metadata?

748


What is datastage engine?

735


1.new record it will insert but changes of natural key is not present in taget i want to update (here key is composite natural key )can any one help this to explan how to do

1665


What is the difference between the local container and shared container?

656






Can you explain engine tier in information server?

664


What all are the different way to run a job?

652


hi.... am facing typical problem in every interview " I need some critical scenarios faced in real time" plz help me guys

2434


table actions available in oracle connector?

1101


What are some prerequisites for datastage?

625


How many Key we can define in remove duplicate stage?

830


What is oci?

865


What are constraints and derivations?

662


Can you explain tagbatch restructure operator?

712


Differentiate between operational datastage (ods) and data warehouse?

682