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

What is factless fact schema?

1 Answers  


What could be the possible resons of locks by user?

0 Answers  


Hi,tell me the system testing and Integration Testing in the Informatica ? Thank You

2 Answers   TCS,


How will you update the first four rows and insert next four rows in a mapping?

5 Answers   CTS,


What is critical mapping?

2 Answers  






Can we make worklet inside worklet?

1 Answers  


what is mean by throghput? in informatica

3 Answers   Cap Gemini,


If you want to create indexes after the load process which transformation you choose?

3 Answers   HCL,


What is the actual work done in Development and in the production depts in building a datawarehouse. Which dept is more interesting and career oriented .

1 Answers  


While importing the relational source defintion from database,what are the meta data of source U import?

1 Answers  


what is the drillup & drill down?and use of the drill up and drill down?

1 Answers   IBM,


What are the issues that you have faced while moving your project from the Test Environment to the Production Environment? Please explain in depth thanks in advance

3 Answers  


Categories