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 are the different layers in the information server architecture?

630


How to implement complex jobs in data stage?

602


What are the features of datastage flow designer?

617


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

817


Name the different sorting methods in datastage.

600






Have you have ever worked in unix environment and why it is useful in datastage?

630


how to sort two columns in single job in datastage.

2521


how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?

1908


What is datastage?

634


How the ipc stage work?

661


What are system variables and sequencers in datastage

595


What are the steps needed to create a simple basic datastage job?

639


What is the purpose of pivot stage?

594


There are two file are there .1st file contains 5 records and 2nd file contain 10 records in target they want 50 records.how can achieve this

1793


What are the job parameters?

692