Oracle group_concat

Posted by admin on Feb 17, 2011 in Business Intelligence, Database |

Oracle has the MySQL equivalent of group_concat using the following procedure

SELECT
  USER_ID,
  wmsys.wm_concat(SERVICE_PACK_NAME),
FROM
  USERS,
  SERVICE_PACKS,
group by 
 USER_ID;

returns
user1 servicepack1,servicepack2,servicepack3
user2 servicepack3
etc

Leave a Reply

XHTML: You can use these tags:' <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Copyright © 2008-2017 Brinsmead Data Services All rights reserved.