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

which one is better performance wise joiner or look up

0 Answers   Informatica,


What is diff joiner and lookup

4 Answers   BirlaSoft,


In a scenario I want to change the dimensions of a table and normalize the denomralized table which transformation can I use?

4 Answers  


How is Source Side push down optimization different to just providing a SQL override in Source qualifier transformation.

0 Answers  


Which transformation is needed while using the Cobol sources as source definitions?

0 Answers   Informatica,






Is it necessary to maintain the primary-foreign key relation ship between the targets in informatica while loading using constarint based loading or it is required only at database level ??

1 Answers   IBM,


WHAT IS THE NAME OF THAT PORT IN DYNAMIC CACHE WHICH IS USED FOR INSERT , UPDATE OPRATION ?

4 Answers   Oracle,


how you will maintain version?

3 Answers   CTS, TCS,


can we use self join in informaitca?

3 Answers   IBM,


what is the size of your data warehousing?

0 Answers   IBM,


hi all my source looking like below column1 column2 101,102,103 abc,def,ghi 1001,1002,1003 a,b,c i want my target is column1 column1 101 abc 102 def 103 ghi 1001 a 1002 b 1003 c any one can you help

1 Answers  


What are the limitations of joiner transformation?

0 Answers   Informatica,


Categories