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

What is synchronized subquery?

1169


Whis is not false in primary key?

1457


How do I truncate a sql log file?

1074


Is id a reserved word in sql?

1145


Is oracle sql free?

988


What is sqlite used for?

1002


what is sp_pkeys? : Transact sql

1159


How insert into statements in sql?

1074


what are the different type of normalization? : Sql dba

1027


What is sql and explain its components?

1067


What is a mutating table and a constraining table?

1114


Explain unique key in sql.

1014


List the ways to get the count of records in a table?

900


What is data profiling in sql?

1080


What do you understand by case manipulation functions?

1034