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
Answer / devi
CREATE TABLE B
AS
SELECT * FROM A
ORDER BY ROWNUM DESC;
Is This Answer Correct ? | 26 Yes | 4 No |
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 |
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 |
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 |
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 |
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 |
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 |
What is the Difference between sorter and aggregator?
What is the procedure for creating independent data marts from informatica 7.1?
1)what is the use of bottlenecks in informatica. 2)where we are use shellscripting. 3)what meant by informatica.
How many repositories can be created in informatica?
can we load the data with out a primary key of a table? what is target plan?
What is the method of loading 5 flat files of having same structure to a single target and which transformations I can use?
what is a junk dimension ?
14 Answers Atos Origin, Cognizant, HS, NIIT, TCS,
Explain how to import oracle sequence into informatica?
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…….
what r the transformations that r not involved in mapplet?
hOW CAN WE DELETE A RECORD OR TRUNCATE IN TARGET TABLE USING SQL T/R ?
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.