how can i get 2nd highest salary in datastage?can u send me
,thanQ
2)if i had source has 2 records 1st record ie 1st column
contains 1,2,3 and 2nd coulmn contains 10,10,10 i have to
get target as 2nd columns as 20,30,40 how can i?

Answer Posted / ram

there are two ways you can get.
1. sort the data in descending order and make true the
create key change column.
2. this can be done in transformer stage at stage variables.
a. first sort the data on descending order (key would the
column which you wanted to be).
define three stage variables in transformer....sv1,sv2 & sv3
set sv2 and sv3 initial values to 0.
then...
if (salary=sv3) then sv2 else (sv2+1) ------> sv1
sv1 -------> sv2
salary --------> sv3

in next link filter...
constraint sv1=1
now you can see all 1st highest salary, 2nd highest
salary..and so on

Is This Answer Correct ?    5 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the Environment Variable need to Set to TRIM in Project Level?(In transfermer, we TRIM function but I need to impliment this project level using Environment variable)

1900


How do you import and export data into datastage?

703


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

1911


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

2288


tell me 5 situations when we r using oracle db stages like orecle connector, oracle enterprise

2706






What is orabulk stage?

634


How many areas for files does datastage have?

642


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

1653


What are the different common services in datastage?

705


options available in sequence job to run,validate?

840


How many types of sorting methods are available in datastage?

633


What is the difference between datastage and informatica?

612


how can we create rank using datastage?what is the meaning of rank?

8187


What is the difference between server job and parallel jobs?

672


project Steps,hits, Project level HArd things,Solved methods?

1635