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 will you load you daily/monthly jobs datas in to Fact and Dimension table using datastage.

2993


Define oconv () and iconv () functions in datastage?

883


Describe routines in datastage? Enlist various types of routines.

581


what is stage is used for below Input columns: dept|mgr|employee|salary Output columns: mgr|count of employee per mgr|avg salary per dept note: each dept has one mgr and each mgr has many employees

663


How do you run datastage job from the command line?

604






What are the main differences you have observed between 7.x and 8.x version of datastage?

624


client know skid info?

1635


What are the components of ascential data stage?

650


Terminate Activity

841


Difference between ‘validated ok’ and ‘compiled’ in data stage?

677


Hi,can any one please mention list of dimension and fact tables for Sales and Distribution System for a Pharmacutical company.

1670


How to reverse the string using SQL?

894


what is flow of project?

1559


What is job control?

624


if we using two sources having same meta data and how to check the data in two sources is same or not? and if the data is not same i want to abort the job ?how we can do this?

1758