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

EXPLAIN SCD

0 Answers   CTS,


how to retrive the max(sal),deptno,empno in datastage?

13 Answers   Polaris,


What is the difference between odbc and drs stage?

0 Answers  


WAT TYPE OF PL/SQL QUERRYS USED IN DATASTAGE

0 Answers  


Wat is isolation level and when do u use them?

1 Answers   HP, IBM,






if the source file is CID,CCODE,CONNDATE,CREATEDBY 0000000224,1000,20060601,CURA 0000000224,2000,20050517,AFGA 0000000224,3000,20080601,TUNE 0000000225,1000,20020601,CURA 0000000225,2000,20050617,AFGA 0000000225,3000,20080601,TONE AND TARGET is oracle following are the validations cid loaded with unique records leading zeors has to be deleted while loading cid in target load only customer who got early connected to company conn_date should be loaded into oracle date format cid datatype is varchar2 in target conn_date is data datatype ccode is varchar2 0000000224,1000,20060601,CURA 0000000224,1000,20060601,CURA

2 Answers  


How do you find the number of rows in a sequential file?

1 Answers  


5) A file contains 10 (1-10) I want trgt like Trgt 1 trgt 2 trgt 3 1 2 3 4 5 6 7 8 9 10

4 Answers  


What is audit table?

1 Answers  


source file contains 100 records, i want 10 records in target file how it possible in datastage

6 Answers   IBM,


Hi guys, In sequencer job, we have 3 sources, in that 1st source have some records, Here requirement is 1st source records are 100 then only run the job otherwise total job will abort... How to calculate this. please design the job. Thanks.

1 Answers   IBM,


i have seq file that contents 10 million records load to target any data base.. in that case it takes lot of time for loading..how do performance tuning in that situation...?

5 Answers   TCS,


Categories