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

how can we validate the flat files using the date in the header and number of records in the flat file? Using both conditions at a time.

2735


Hi guys, Please design a job for dis requirement with derivation(solution). my source table like dis. emp_no qualification 1 a 1 c 2 a 3 c 3 b To loaded to target like dis emp_no qualification 1 b 2 b 2 c 3 a my requirement is every employer have three qualifications i.e a,b and c. what qualification missed in source table that will be move to target systems. Hope u got it the requirement. Right Thanks.

2428


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

677


Describe routines in datastage? Enlist various types of routines.

581


CHANGE CAPTURE

896






What are the some differences between 7.x and 8.x version of datastage?

742


What are the areas of application?

660


What are some prerequisites for datastage?

617


What are the partitioning techniques available in link partitioner?

1755


Why do we use exception activity in Datastage?

728


Hi , Can anyone give few examples of scenarios and there corresponding design in datastage..i am new to this tool...confused in design while my manager asking to design the job.. Please post the URL if there..so i can go through it.. Thanks in advance...

3759


What is the differentiate between data file and descriptor file?

863


How do y read Sequential file from job control?

14418


How many types of views are there in a datastage director?

834


Demonstrate experience in maintaining quality process standards?

1939