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 factless fact schema?
What could be the possible resons of locks by user?
Hi,tell me the system testing and Integration Testing in the Informatica ? Thank You
How will you update the first four rows and insert next four rows in a mapping?
What is critical mapping?
Can we make worklet inside worklet?
what is mean by throghput? in informatica
If you want to create indexes after the load process which transformation you choose?
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 .
While importing the relational source defintion from database,what are the meta data of source U import?
what is the drillup & drill down?and use of the drill up and drill down?
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