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 the Difference between sorter and aggregator?

2 Answers  


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

0 Answers  


1)what is the use of bottlenecks in informatica. 2)where we are use shellscripting. 3)what meant by informatica.

1 Answers   CTS,


How many repositories can be created in informatica?

1 Answers  


can we load the data with out a primary key of a table? what is target plan?

6 Answers   IBM,


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

8 Answers   TCS,


what is a junk dimension ?

14 Answers   Atos Origin, Cognizant, HS, NIIT, TCS,


Explain how to import oracle sequence into informatica?

0 Answers  


My i/p is 1,2,3,4,5,6,7,8,9,10……….. o/p to be populate in two tables as below. o/p1: 10,20,30,40,50,60,70,80,90……. o/p2: 11,21,31,41,51,61,71,881,91…….

7 Answers   Accenture,


what r the transformations that r not involved in mapplet?

8 Answers   Wipro,


hOW CAN WE DELETE A RECORD OR TRUNCATE IN TARGET TABLE USING SQL T/R ?

4 Answers  


when i try to connect to the repository server i am getting this message can someone help me.. Starting Repository [infa_rep] (6016|1292) Informatica Repository Agent, version [7.1.1], build [0811], 32-bit. (6016|1292) Copyright (c) 2000-2004 Informatica Corporation. All Rights Reserved. This Software is protected by U.S. Patent Numbers 6,208,990; 6,044,374; 6,014,670; 6,032,158; 5,794,246; 6,339,775 and other U.S. Patents Pending. (6016|1292) Informatica Repository Agent starting up. (6016|1292) Security audit trail has been turned off. (6016|1292) infa_rep: Repository runtime manager initialized. (6016|1292) infa_rep: Initialized configuration information. (6016|1292) infa_rep: Initialized request dispatcher. (6016|1292) Database Connection Error : Failed to logon to Database server ORA-12154: TNS:could not resolve service name Database driver error... Function Name : Connect Database Error: Failed to connect to database using user [] and connection string []. (6016|1292) Service stopped.

1 Answers  


Categories