Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 sort two columns in single job in datastage.

2840


What is the difference between in process and inter process?

1088


Is it possible to query a hash file?

1950


how do u catch bad rows from OCI stage? And what CLI stands for?

2748


Why fact table is in normal form?

1146


What is quality stage?

937


What is the difference between account and directory options ?

1109


1.what is repartionoing technique? 2.what deliverables transferred to client using datastage? 3.how to write loop statements using nested loop sequence?

2207


DB2 connector> transformer > sequential file Data will be exported into a csv format in a sequential file. This file will be send in a email using a sequence job. Problem here is, how to avoid sending a blank csv file? When I ran the job there are chances that it might return zero records but in the sequence job csv file is going blank. how can I avoid this? thanks

1470


How to implement complex jobs in data stage?

1049


If you want to use the same piece of code in different jobs, how will you achieve it?

1094


What is the method of removing duplicates, without the remove duplicate stage?

954


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

1189


Why do we use exception activity in Datastage?

1224


How do you run datastage job from the command line?

1026