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


Please Help Members By Posting Answers For Below Questions

Give a way in which u can implement a real time scenario where data in a table is changing and u need to look up data from it.How will u configure the look up transform for this purpose?

1471


how to do aggregation (year wise quantity ) using only source qualifier, the source is sql server date as datetime data type and target as flat file with year (string datatype)

2243


what is the use of structures?how many nodes can u create in a structure?

1759


explain the methodology of Data Warehousing?(Polaries)

1484


What are various etl tools in the market?

526






Assume u have a 24CPU machine with 24GB RAM, suggest how u would like to configure Informatica ,like number of concurrent sessions, RAM requirements etc,max partitions that u would permit per mapping.

1562


Explain what are the various etl tools in the market?

523


What is virtual Data Warehousing?

555


what is the difference steps for data modeling?

2083


What is full load & incremental or refresh load?

689


what are the concerns of OLTP and DSS systems?

1975


Hi, can anyone plz share the project architecture for etl testing(banking domain) plz explain the architecture .

2573


give detail on the sales project how many number of dimensions & fact tables are used in projec briefly. how the four fact tables taken in the project.

1928


What are the etl testing operations includes?

589


How many steps etl contains?

533