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 use of datastage director?
How to find value from a column in a dataset?
Hi everyone,I have kept a project Sales And Distribution for a pharmaceutical company.can anybody explain one complex business rule that we had in our project and how did you accomplish it using DS?
How a routine is called in datastage job?
What is the difference between server job and parallel jobs?
what is stage is used for below Input columns: dept|mgr|employee|salary Output columns: mgr|count of employee per mgr|avg salary per dept note: each dept has one mgr and each mgr has many employees
Different ways a project can be moved to production ?...example ….export-import and Version control.
I have a few records just I want to store data in to targets cycling way how?
Enlist various types of routines in datastage.
project Steps,hits, Project level HArd things,Solved methods?
What is the difference between account and directory options ?
Name the command line functions to import and export the DS jobs?
On which Dimension Table you implemented SCD Type in your Project
whom do you report?
how to delete one row in target dataset