cust id,cust quty like 1,101;1,102;1,103 i want output like
cust id,cust quty 1 101,102,103 in oracle please write a
query in oracle

Answer Posted / subhash

PIVOT finction available from ORCLE 11g Onwards:

SELECT *
FROM (SELECT customer_id, customer_quantity
FROM pivot_test)
PIVOT (customer_quantity FOR (customer_quantity
) IN (101, 102, 103))
ORDER BY customer_id;


Output:
1 101 102 103

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

A signal has a wavelength of 1 micro min in air.how far can the front of the wave travel during 1000periods?

2037


How will you move hashed file from one location to another location?

1663


What is a folder? Difference types of stages?

638


Hi All , in PX Job I have passed 4 Parameters and when i run the same job in sequence i dont want to use those parameters , is this possible if yes then how

1124


How to RD using transformer?

870






How many types of sorting methods are available in datastage?

640


which r the connectors used in san?

1800


Define Routines and their types?

629


Define data aggregation?

677


what is the use of surogate key in datastage

1827


what should be ensure to run the sequence job so that if its get aborted in 10th job before 9job should get succeeded?

960


Where do you see different stages in the designer?

637


How to implement complex jobs in data stage?

621


What is the difference between the local container and shared container?

656


How to read the length of word in unix?

890