we hava more than 1000 records. i have to select first 5
record, last 5 record and 5 records from middle of the source.
how can i do in oracle as well as in informetica??
Answer Posted / babu
Hi All,
ORACLE:
========
Below SQL query will give the exact result of what you
people are expecting.
SELECT rownum num,e.* From Emp e Where Rownum<=5
Union
SELECT * From
(SELECT Rownum Num,E.* From Emp E)
Where Num BETWEEN (SELECT round(Count(*)/2) From Emp)AND
(SELECT round(Count(*)/2) +1 From Emp)
Union
SELECT * From
(SELECT rownum num,e.* From emp e)
Where Num <=(SELECT count(*) From Emp)
And
Num>(SELECT count(*)-5 From Emp)
INFORMATICA:
============
please find the below mapping for your scenario.
SRC==>SQ==>(1)EXP==>AGG=====JNR===>RTR==T1,T2,T3
|| ||
(2)EXP==========
1> In first expression having the all columns coming from
the source and two extra columns(output ports)
I.one for sequence numbers.
II.second one is for constant value
2> In aggregatation transformation count the number of
records based(GROUP BY)on the dummy port.
3> In joiner transformation join the two flows(AGG and Exp
the join column is dummy port)
4> create 3 groups in Router transformation for 1St 5
records,Latst 5 records and Middle 5 records
GRP1::sno<=5
GRP2::sno<=cno+2 and sno>=cno-2 /*cno=count(*)*/
GRP3::sno<=cno and sno>cno-5
Cheers,
Babu rao
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Compare etl & elt?
1)Power center server and client on the same machine 2)power center server and client on the different machines What is the basic difference in these two setups and which is recommended ?
What are the types of Data Warehouse applications?
HI, Anybody is having informatica Dumps,if it there Can u send to my mail id :sathesh.cool@gmail.com
how do u set partition points in the mapping?
What is partitioning? Explain about round-robin, hash partitioning.
When do we go for the tools in the market?
Informatica server and client are in different machines. You run the session from the server manager by specifying the source and target databases. It displays error . You are confident that everything is correct. Then why it is displaying the error?
What is a mapping?
if i have a query as flat file how can we load data to target table
Explain the use lookup tables and Aggregate tables?
What are various etl tools in the market?
What are cubes and olap cubes?
how do u identify the changed records in operational data?
what is the difference steps for data modeling?