Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 use of code page?

1176


What is substr in informatica?

1262


What is a passive transformation?

1154


One of the optimizing technique to improve the session performance is push down optimization,by using push down optimization we push as much as transformation logic to source/target database,but this degrades the d/b performance,how to overcome this?

2312


Clarify the utilization of aggregator cache record?

1045


Define the various join types of joiner transformation?

1042


What does “tail –f” command do and what is its use as an Informatica admin.

1147


Explain what are the different types of transformation available in informatica.

1249


What is an unconnected transformation?

1131


Why can't we connect source qualifier and aggrigator transformation to an expression ? Why they resticted to conncet 2 active trasformations to an passive transformation ?

2246


What is an aggregator transformation?

1147


What is a transaction control transformation?

1264


Do you find any difficulty while working with flat files as source and target?

1149


What is meant by incremental aggregation?

1185


What does role playing dimension mean?

1095