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?

Answers were Sorted based on User's Feedback



how can i get 2nd highest salary in datastage?can u send me ,thanQ 2)if i had source has 2 record..

Answer / farzana kalluri

seq file--->sort(descending)stage--->surrogate key stage---
>target


sort tha data in descending order ,then it will shows from
highiest salary, after that keep surrogate key stage it
will automtaically generates the nos so that we can
identifiy the 2nd hieght salary .

Is This Answer Correct ?    8 Yes 1 No

how can i get 2nd highest salary in datastage?can u send me ,thanQ 2)if i had source has 2 record..

Answer / subhash

for 2nd Qn:
Source is:
Col1 Col2
1 10
2 10
3 10
In transformer, we put the below logic:

Link.Col1 * Link.Col2 + Link.Col2------>Col2

1*10+10------------->20
2*10+10------------->30
3*10+10------------->40

Hope this is fine.

Is This Answer Correct ?    7 Yes 1 No

how can i get 2nd highest salary in datastage?can u send me ,thanQ 2)if i had source has 2 record..

Answer / 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 5 No

Post New Answer



More Data Stage Interview Questions

How to write a expression to display the first letter in Caps in each word using transformer stage ? Please let me know ASAP Thanks in advance...

0 Answers   Alpharithm Technologies,


hi i am madan, in real time data stage who is the source provide? and how to recevied in developer? Pls send me answer 

1 Answers   HCL,


Hi,can any one please mention list of dimension and fact tables for Sales and Distribution System for a Pharmacutical company.

0 Answers   Syntel,


How to manage date conversion in Datastage?

0 Answers  


how many write modes are there in ds

2 Answers   IBM,






What are the functionalities of link partitioner and link collector?

0 Answers  


how can u handle null values in transformer stage.

7 Answers  


Hi , Can anyone give few examples of scenarios and there corresponding design in datastage..i am new to this tool...confused in design while my manager asking to design the job.. Please post the URL if there..so i can go through it.. Thanks in advance...

0 Answers   UHG,


How can we run same job in 1 day 2 times

7 Answers   IBM,


what is usage of datastage with materialized views

4 Answers   HP, TCS,


Explain Quality stage?

0 Answers  


what should be ensure to run the sequence job so that if its get aborted in 10th job before 9job should get succeeded?

0 Answers   CTS,






Categories