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 a grid in Informatica?

1064


Write the advantages of partitioning a session?

1269


In What Situations we can use MappingParameters ,Mapping Variables AND Session Parameters in REAL TIME.

2058


What is a predefined event?

1087


What is native users?

1146


What is a filter transformation?

1037


Differentiate between joiner and lookup transformation?

1100


What is meant by LDAP users?

1194


what is diff b/t sorter t/r and agg have the option sorter property...

2169


Separate from an archive server and a powerhouse?

955


What are the steps involved in the migration from older version to newer version of Informatica Server?

2102


Performance tuning( what you did in performance tuning)

1972


Differences between connected and unconnected lookup?

1211


What is the way to execute pl/sql script using informatica mapping?

1591


Is there any target staging area in informatica not staging area

2573