Develop a mapping to extract the employee drawing maximum salary where deptno = department drawing maximum sum(salary) group by dept.sources are cobol files / flat files.

This is the recent question faced in ibm.

Showing Answers 1 - 12 of 12 Answers

gkbiswal

  • Sep 30th, 2007
 

what's understood from the question is to findout the employeename drawing the max salary.If it's not can u crarify the question .

  Was this answer useful?  Yes

viswanadh kintali

  • Nov 19th, 2007
 

I dont think this can by using a mapping. Following sql gives the dept number that gives maximum salary paid to all the employees put together.

SELECT b
.deptno
FROM
(SELECT deptno,
SUM(salary) sal FROM emp GROUP BY deptno) b
WHERE
sal= (SELECT  MAX(a.sal) sals
FROM (select deptno, sum (salary) sal
FROM emp GROUP BY
deptno) a)


Let me know if this helped you.

visu

  Was this answer useful?  Yes

Mamta11

  • Oct 14th, 2008
 

This can be done in informatica mappinsg by using the Aggrgator transformation.
Select all the ports from source qualifier joining on departmetn into aggregator .
Group by departmetn no and select max(salary)

  Was this answer useful?  Yes

sri_test

  • Dec 16th, 2008
 

It is not possible to combine two tables with different sources,so first convert the department table normal oracle target

Mapping 1:

1: For cobol dept source use normalizer to convert to oracle target
2: For flat files simply convert to oracle using source transformer

Mapping 2:

1: Use the converted dept mapping 1 (oracle source) and emp table (oracle source) connect there source transformer to joiner tranformer using emp.deptno = dept.depno
2: Since joiner doesn't join directly with aggregator take the output to expression transformation then to aggregator apply max(sal) group by deptno
3. Finally take the output to target

Workflow:

Design the worflow(W1: Mapping 1) then workflow (W2: Mapping2),make w2 to run only if w1 is finished and successfully completed.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions