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
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 ? | 9 Yes | 1 No |
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 | 6 No |
How to reverse the string using SQL?
What are the unit test cases you used in your project?
How to implement complex jobs in data stage?
1) In a dataset how to delete a single row? 2) i have 50 rows , i want to display 5-7 records only? How to write the sql query? 3)i have 40 rows,i want to display last row? write sql query?
hi this is kiran i have one table i want divide the table with two different table like even rows and odd rows how can i do this one tell me plzz
In which situations we can use normal and sparse lookup stages
Hi friends If anybody completed datastage 8.5 certification.Could please guide me what are the topics new in 8.5 certification.
EXPLAIN SCD
How to reverse the string using unix?
Define Job control?
i have a table col1 10 20 30 40 10 20 50 my requirement is how to retrive only duplicates like 10 10 20 20 like this how it's possible in SQL?
Name the different types of Lookups in Datastage?