Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

explain the methodology of Data Warehousing?(Polaries)

2277


what are the data sources extracted from logistics cockpit in sap bw project and what is the requirement for it ?

2616


Explain about hash partitioning?

980


List few etl bugs?

919


how can i text accracy of ETL migration? i am very new to data warehousing. we are writing ETL scripts using SCRIPELLA tool. how can i test the correctness of data. and we are generating reports using pentaho . is there any easy way to test the pentaho. how can test these ETL scripts written in scriptella? thanks in advance

2532


what is the difference between cardinality and Nullability?

2930


What is etl process. How many steps etl contains explain with example?

937


SCD2 will work on only dimension tables as well as fact Table?

1384


dimension object created in oracle can be imported in designer?how?

2966


what is the use of server manager?

2115


What is a materialized view log?

985


what is pmrep command?

11546


What is etl tool in hadoop?

880


when u connect the repository for the first time it asks you for user name & password of repository and database both.But subsequent times it asks only repository password. why?

2159


What are the etl testing operations includes?

1090