i want for the 3rd max sal using for the any stage but max
sal is based on the deptno ?
any body know this ans pls send this mail siva3me@gmail.com

Answers were Sorted based on User's Feedback



i want for the 3rd max sal using for the any stage but max sal is based on the deptno ? any body ..

Answer / subhash

Src ---> Tfm ---> Tgt
in the TRANSFORMER Stage.

Do the HASH partitioning the incoming data and 'Perform
Sort' on DEPTNO ASC order and SAL DESC order.

and use 2 STAGE VARIABLES sv1=0 & sv2=0.

sv2 ===> If sv1=DEPTNO Then sv2+1 Else 1
sv1 = DEPTNO

And Put the below Link contraint:
sv2=3


Then u will get 3rd highest SAL from each DEPT.

Is This Answer Correct ?    5 Yes 0 No

i want for the 3rd max sal using for the any stage but max sal is based on the deptno ? any body ..

Answer / vinod

SIMPLE ONE IS.

USE THE TRANSFORMER STAGE.

BEFORE LOADING THE DATA IN TO TRANSFORMER STAGE THE DATA
MUST IN SORTED ORDER OF SAL AS DES AND DEPT AS ASC.

IN TRANSFORMER I AM GOING TO USE THE STAGE VARIABLES.

STR IF DEPT=STR1 THEN STR+1 ELSE 1

STR1 DEPT

THEN USE THE FILTER IN THAT PLACE CONDITION STR=3

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More Data Stage Interview Questions

1.What is a delta record? How you will read it? 2.What are the different types of sorting?

0 Answers   EDS,


i WANTED TO USE THE RANGE LOOKUP SCENARIO IN DATASTAGE 7.5.2 SRVER JOB.i HAVE A DATE FIELD IN SOURCE AND I SHOULD MATCH IT WITH A FIELD IN LOOKUP FILE.BUT,THE FIELDS SHOULD MATCH EVEN THOUGH THERE IS SOME RANGE.CAN SOMEONE TELL ME HOW CAN I DO THAT. THANKS

0 Answers  


If you want to use the same piece of code in different jobs, how will you achieve it?

0 Answers  


Unix command to view the data in a dataset

2 Answers   IBM,


Define Job control?

0 Answers  






what is the diff b/w switch and filter stage in datastage

2 Answers   Cap Gemini,


1. How many People are part of your Team? 2. Explain how you create jobs or flow of project? 3. Join Stage vs Lookup vs Merge Stage 4. Summation scenario based question - How you find sum of salary for a specific employee (Explain stages and flow of job)? 5. Explain Remove duplicates stage ? Can you do sort in this stage? 6. SQL Questions - Joins - Types, Difference between Join and Union 7. Unix Questions - How you run the Job, How you list all jobs in project 8. Explain Environmental Variables? 9. SQL Scenario - If you have 3 Identical record in a Table, Ex: 1, Ram, Xyz; 1, Ram, Xyz; 1, Ram, Xyz; Delete only 2 of the records and keep only 1 using the Delete query. How you will you do this?

1 Answers  


What is RCP

5 Answers   CGI, CTS,


in aggregator , how can i get the sum in readable format

4 Answers   IBM,


What is job control?

0 Answers  


How to read the length of word in unix?

0 Answers   CTS,


how to remove duplicates in transformer stage by using stage variables?one example?

6 Answers   Syntel, TCS,


Categories