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

If the source has duplicate records as id and name columns, values: 1 a, 1 b, 1 c, 2 a, 2 b, the target should be loaded as 1 a+b+c or 1 a||b||c, what transformations should be used for this?

9296


Explain sessions. Explain how batches are used to combine executions?

768


What are the transformations that are not supported in mapplet?

771


what is the hint? how to use it to reduce the query processing in program?

7037


How do you migrate data from one environment to another?

830






What is meant by incremental aggregation?

744


On which transformations you created partitions in your project?

958


How to convert a row into column and a column into rows? Name all DTM threads. What all threads stop when we issue STOP or ABORT? How to pass the value of a data(variable kind of) from one session ( generated in mapping) to another session in the same workflow... What are the tyoes of partitioning you know and how to apply them in real time ... Can partitioning be applied to expression transformation and how

1337


How many number of sessions can one group in batches?

884


Can we use procedural logic inside infromatica? If yes how, if now how can we use external procedural logic in informatica?

782


What are the tasks that can be performed using sq?

799


Is it possible to create multiple domains on a single Informatica server?

978


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

877


scenario where i can use only concurrent execution of workflow.

2760


What is expression transformation?

813