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

In Datastage, how you can fix the truncated data error?

869


Explain the datastage parallel extender (px) or enterprise edition (ee)?

995


On which interface you will be working as a developer?

841


Hi guys, Please design a job for dis requirement with derivation(solution). my source table like dis. emp_no qualification 1 a 1 c 2 a 3 c 3 b To loaded to target like dis emp_no qualification 1 b 2 b 2 c 3 a my requirement is every employer have three qualifications i.e a,b and c. what qualification missed in source table that will be move to target systems. Hope u got it the requirement. Right Thanks.

2670


what is the use of materialized view?

1217


How do y read Sequential file from job control?

15110


What is the difference between in process and inter process?

915


Can you filter data in hashed file?

3572


Describe the main features of datastage?

864


Where the datastage stored his repository?

806


if we using two sources having same meta data and how to check the data in two sources is same or not? and if the data is not same i want to abort the job ?how we can do this?

2008


What is the precedence of stage variables,derivations, and constraints?

822


What is the difference between server job and parallel jobs?

922


Source has 2 columns: USA,NewYork INDIA,MUMBAI INDIA,DELHI UDS,CHICAGO INDIA,PUNE i want data in target like below: INDIA,MUMBAI1 INDIA,DELHI2 INDIA,PUNE3 USA,NEWYORK1 USA,CHICAGO2

563


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

1168