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
How many types of views are there in a datastage director?
why do u need the IOS upgradation in a FC switch
How will you move hashed file from one location to another location?
What are the areas of application?
What is the difference between the local container and shared container?
Where do the datastage jobs get stored?
What is ibm datastage?
how to implement scd2 in datastage 7.5 with lookup stage
Difference between IBM DATA STAGE8.5 and DATA STAGE9.1 ?
What are the types of containers and how to create them?
How do you run datastage job from the command line?
What are the steps required to kill the job in Datastage?
What all are the different way to run a job?
How to Remove Duplicate using SQL?
Differentiate between datastage and datastage tx?