top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

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

+1 vote
328 views
In a table, 4 person having same salary. How to get Third person record only?
posted Sep 1, 2015 by Amit Sharma

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

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;

Or

Use a Sequence Generator Transformation,selet Start value = 1 and Increment By = 1.

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.
answer Sep 2, 2015 by Manikandan J
Similar Questions
0 votes

Design a mapping to load the first record from a flat file into one table A, the last record from a flat file into table B and the remaining records into table C?

+1 vote

What is the method of loading 5 flat files of having same structure to a single target and which transformations I can use?

...