i have oracle table A and target B. i don't know how many
records. i want get get last record in table A as first record
in target table B. write a sql query?

Answers were Sorted based on User's Feedback



i have oracle table A and target B. i don't know how many records. i want get get last record..

Answer / devi

CREATE TABLE B
AS
SELECT * FROM A
ORDER BY ROWNUM DESC;

Is This Answer Correct ?    26 Yes 4 No

i have oracle table A and target B. i don't know how many records. i want get get last record..

Answer / priyank

In Informatica, make table A as Source and follow the below
mapping:

SRC_A --> AGG --> TGT_B

AGG: Do not check any of the columns for group by and pass
the output to target B. In this way, only the last row will
be passed through.

Is This Answer Correct ?    1 Yes 1 No

i have oracle table A and target B. i don't know how many records. i want get get last record..

Answer / upendra

select * from (select rownum as num,a.* from A a) where num=(select count(*) from A);

Is This Answer Correct ?    0 Yes 0 No

i have oracle table A and target B. i don't know how many records. i want get get last record..

Answer / upendra

In Informatica mapping we can find source A last record into Target B first record.


SRC-->Rank--> TGT

note:rank transformation edit propertities tab assign bottom=1

Is This Answer Correct ?    1 Yes 1 No

i have oracle table A and target B. i don't know how many records. i want get get last record..

Answer / dilip ingole

by using with clause


WITH DATA AS(SELECT NUM,ROWNUM RN ,COUNT(1)OVER() CNT FROM A)
SELECT NUM,RN FROM DATA WHERE RN=1
UNION
SELECT NUM,RN FROM DATA WHERE RN=CNT;

Is This Answer Correct ?    0 Yes 0 No

i have oracle table A and target B. i don't know how many records. i want get get last record..

Answer / pooja

CREATE TABLE B
AS
SELECT *
FROM
(SELECT *
FROM
(SELECT *,ROWNUM R
FROM A)
ORDER BY R DESC)
WHERE R=1;

Is This Answer Correct ?    0 Yes 1 No

i have oracle table A and target B. i don't know how many records. i want get get last record..

Answer / mr lee

Select * From Table A Where ROWID = (Select Max(ROWID) From
Table A
Union
Select * From Table B Where Rownum = 1

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Informatica Interview Questions

Update strategy transformation is an active transformation.How it changes the number of records that pass through it? Please explain....

2 Answers  


What did you do in source pre load stored procedure

1 Answers  


Explain the types of transformations?

0 Answers  


What are the components of workflow manager?

0 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,






can we use union transformation in joiner transformation?how?

1 Answers   Dabur, Tech Mahindra,


What is informatica metadata and where is it stored?

0 Answers  


why u go for dimensions ?

3 Answers   TCS,


what is mapping parameter?

2 Answers   Cap Gemini,


What is the procedure for creating independent data marts from informatica 7.1?

0 Answers  


Explain load alternative records / rows into multiple targets - informatica

0 Answers   Informatica,


Do you find any difficulty while working with flat files as source and target?

0 Answers  


Categories