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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the main purpose of Unconnected lookup other than updating slowly changing dimensions? or In which case u use Unconnected lookup?

6440


What is enterprise data warehousing?

621


What is aggregate cache in aggregator transformation?

643


Differentiate between source qualifier and filter transformation?

1014


My source is delimited flat file Flat file data is H|Date D1|ravi|bangalore D2|raju|pune T|4 The data will be send to target if the fallowing two conditions satisfied 1.The first row Date column is equal to SYSDATE 2.Last record second port equal to number of records. How to achieve?

1476






What is mapping debugger?

577


Implementation methodology

1271


What is rank transform?

611


What is the difference between SOURCE and TARGET BASED COMMITS? What are the deliverables?in your project?

1646


What is target load order?

814


How do you handle two sessions in Informatica

675


What are the different types of repositories created using informatica?

671


How can informatica be used for an organization?

666


What are the validations that you can perform in oracle and in informatica ? Advance Thanks

1666


What is a sequence generator transformation?

588