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

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

What are transforms and what is the differenece between routines and transforms?

1062


What can we do with datastage director?

1233


Define APT_CONFIG in Datastage?

1071


How can one find bugs in job sequence?

1405


What is a merge?

1161


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

2365


What is the differentiate between data file and descriptor file?

1358


how to write server Routine coding?

2116


Define repository tables in datastage?

1151


How and where you used hash file?

1169


Why do you need stage variables?

1180


Can we use target hash file as a lookup ?

3323


What is a merge in datastage?

1263


how to abort the job its matain duplicates?

2572


Hi, what is use of Macros,functions and Routines..? At what situation you are used. If you know the answer please explain it. Thanks.

2056