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...


In a table, 4 person having same salary. How to get Third
person record only?

Answers were Sorted based on User's Feedback



In a table, 4 person having same salary. How to get Third person record only?..

Answer / srikanth

id sal

101 1000

102 1000

103 1000

104 1000


select id, sal from emp where rownum<=3

minus

select id, sal from emp wwhere rownum<=2;

Is This Answer Correct ?    9 Yes 2 No

In a table, 4 person having same salary. How to get Third person record only?..

Answer / hardeep

We can use Rank Trx, Select "salary" as Group by port and select "Date" or "Emp_id" as Rank Port and then Filter out records with Rank=3 thru Filter Trx.

Is This Answer Correct ?    8 Yes 2 No

In a table, 4 person having same salary. How to get Third person record only?..

Answer / saumyabrata

1>Use a Sequence Generator Transformation,selet Start value
= 1 and Increment By = 1.
2>Use a Filter Transformation,take the ports Person and
Salary from source qualifier and the NEXTVAL port from
Sequence Generator Transformation into it.Set the filter
condition NEXTVAL = 3.

You are done.

Is This Answer Correct ?    6 Yes 0 No

In a table, 4 person having same salary. How to get Third person record only?..

Answer / boss

How can you say which is thir record when all the salaries
are same...

Is This Answer Correct ?    3 Yes 2 No

In a table, 4 person having same salary. How to get Third person record only?..

Answer / gopi k

rownum is pseudo column, when query extracts rows rownum
will be appended to query. So where rownum = 3 condition is
a wrong one.

Is This Answer Correct ?    1 Yes 0 No

In a table, 4 person having same salary. How to get Third person record only?..

Answer / sanju

select * from (select salary.*,rownum r from salary where
sal=(select sal from salary group by sal having count(sal)
=4)) where r=3

Is This Answer Correct ?    1 Yes 0 No

In a table, 4 person having same salary. How to get Third person record only?..

Answer / mr.lee

id sal

101 1000

102 1000

103 1000

104 1000

Select Rn, id, Sal, From (
Select Rownum Rn, id ,Sal From Emp)
Where Rn = 3

Is This Answer Correct ?    1 Yes 0 No

In a table, 4 person having same salary. How to get Third person record only?..

Answer / vaas

Hi pooja,

would rowid be 3?
can u use having clause in ur query?

pl let me know poojaa

Is This Answer Correct ?    0 Yes 0 No

In a table, 4 person having same salary. How to get Third person record only?..

Answer / krishnakanth.ch

It can be retrieved with a simple subquery.

For example, I create a table sal with id,sal

id sal
-------
11 1000
22 1000
33 1000
44 1000

to retrieve the third column with the same salary
use the below query:

select id,sal from (select id,sal,rownum r from sal)
where r=3;

Is This Answer Correct ?    4 Yes 4 No

In a table, 4 person having same salary. How to get Third person record only?..

Answer / abhishek

U can achive this by using row_number function in source
qualifer example

select col1,col2,salary,emp_id from (select
col,col2,salary,emp_id , row_number() over (partition by
salary order by emp_id )as rec_seq from table)
Where
rec_seq=3

or by rank t/r in mapping

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Informatica Interview Questions

How can we eliminate duplicate rows from flatfile,explain?

3 Answers  


every DWH must have time dimension so now what is the use of the time dimension how we can calculate sales for one month,half-yr'ly,and year'ly?how we are doing this using time dimension.

1 Answers   IBM,


What is the use of an aggregator cache file?

0 Answers  


How to generate sequence numbers without using the sequence generator transformation?

0 Answers   Informatica,


Can anyone tell me the new features in Informatica 9 Version?

2 Answers   Syntel,


What is informatica worklet?

0 Answers  


My source is EmpID, Salary- (101, 1000)(102, 2000)(103, 3000). In the Target I want the following EmpID, Salary, Composite_Salary- (101, 1000, 1000)(102, 2000, 3000)(103, 3000, 6000). Please guide on how to build the mapping.

5 Answers   Amdocs,


comonly how meny mappings r there in Banking projects?

1 Answers  


hi,there is a scenario like. there are three columns empid,salmonth, sal contains the values 101,jan,1000 101 feb 1000 like twelve rows are there then my required out put is like contains 13 columns empid jan feb marc.......dec and the velues are 101 1000 1000 1000 like this . thank you

5 Answers   Patni,


What is the use of incremental aggregation?

2 Answers  


write sql query following table city gender no chennai male 40 chennai female 35 bangalore male 25 bangalore female 25 mumbai female 15 i want the required output city male female chennai 40 35 bangalore 25 25 mumbai 15

5 Answers   Tech Mahindra,


Hi experts, For informatica developer, in real time, normally how much we use sql and plsql?

2 Answers   Infotech,


Categories