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

How to load last n records of file into target table - informatica

1081


What is the use of target designer?

1054


What is exclusive and normal mode for repository services?

1144


Explain target update override in informatica

1126


Target increases every day even though no new record was inserted

1580


How to create the source and target database connections in server manager?

1090


Briefly explain your complete project(sales) flow, (ie. from source received from client, transformations, then despatch to end user) what are all the process. Kindly give step by step process.

2280


What is the format of informatica objects in a repository?

1019


What is rank transform?

997


How many ways a relational source definition can be updated and what are they?

1017


How to update or delete the rows in a target, which do not have key fields?

1178


What if the source is a flat-file?

1111


Can we create a node as a gateway node and the same node can be assigned to a grid?

1079


What is the status code in stored procedure transformation?

1182


What are the types of caches in lookup? Explain them.

970