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
What is the difference between validated and compiled in the datastage?
What is the roundrobin collector?
How to implement complex jobs in data stage?
What are the steps needed to create a simple basic datastage job?
Give an idea of system variables.
Define meta stage?
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...
Describe link sort?
What is job control?
What are transforms and what is the differenece between routines and transforms?
file having these input and we have to get 3 output using same job Input 1 1 1 2 3 4 4 4 o/p1 o/p2 o/p3 1 1 2 2 1 3 3 1 4 4 4
What is the difference between an operational datastage and a data warehouse?
What is the difference between the local container and shared container?
im new to this tool im now at project plz tell me step by step process how to design plz help me i wnt to go with exp for job plz give me d proper design and explination
What are the processing stages?