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 are the transformations that are used in data cleansing ? and how data cleansing takes place ?
Hi Experts, I have a source table like this. Name Number Raj 2 Ram 1 Sam 2 John 1 In the target I need the ouptput like the below Raj Raj Ram Sam Sam John We dont know the number value . It will be changing as n.. Please help me regarding this. Thanks, Nataraj V
What are the different types of Type2 dimension maping?
can we use lookup t/r in flat files?what are the t/r's can be used in flat files when compared to relational DB?
i have source like X1 10 X2 20 X1 30 X2 40 i want target as X1 X2 10 20 30 40 in informatica
i have ten flat files with same structure,if i want to load it to single target,and mapping needs to should show only one source.what will be the steps to taken to achieve it?/
Why union transformation is an active transformation?
Different qualification between a related rotate toward the sky and isolates look upward?
I have 10 columns in a flat file and 10 rows corresponding to that columns. I want column number 5 and 6 for last five records. In unix as well as informtica.
Define enterprise data warehousing?
what is the size of u r source(like file or table)?
I have two different source structure tables, but I want to load into single target table? How do I go about it? Explain in detail through mapping flow.