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...

how to get enames with comma seperated values by deptwise
on emp table?

Answer Posted / kavitha nedigunta

SELECT deptno ,
LTRIM(MAX( SYS_CONNECT_BY_PATH (
ename, ',')),',') EMP_STRING
FROM
(SELECT empno , ename, deptno,
row_number() OVER ( PARTITION BY deptno ORDER
BY rownum) rn
FROM EMP )
CONNECT BY deptno = PRIOR deptno
AND rn = PRIOR rn+1
START WITH rn =1
GROUP BY deptno
ORDER BY deptno;

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to call a javascript function from pl sql?

1150


Is sql a dbms?

1024


How do I upgrade sql?

1009


What is sql deadlock?

1152


Are stored procedures faster than queries?

953


Is it possible to create the following trigger: before or after update trigger for each row?

1296


What does where 1/2 mean in sql?

1094


What is the starting oracle error number?

1067


What is optimistic concurrency control? : Transact sql

994


What is difference between my sql and sql?

1084


What are local and global Indexes and where they are useful.

1449


How do I run a pl sql procedure in sql developer?

982


What version is sql?

1039


what is the syntax used for partition in tsql? : Transact sql

1026


What is out parameter used for eventhough return statement can also be used in pl/sql?

1091