Weird Query

From: Mtek <mtek_at_mtekusa.com>
Date: Thu, 3 Jul 2008 12:07:56 -0700 (PDT)
Message-ID: <623d3b96-3ab0-4bb4-a218-0cf1029dcc44@x35g2000hsb.googlegroups.com>

Hi,

I have a query which is this:

SELECT cnt || ':' || t_id cnt_t_id
FROM (SELECT COUNT(*) cnt, t_id

      FROM zc_body zb, zc_type zt
      WHERE zb.t_id = zt.id
      GROUP BY t_id);

The output is this:

101:18
49:27
47:36
378:9
118:10

76:15
28:16
38:19

However, they want the output like this:

101:18,49:27,47:36,378:9,118:10,76:15,28:16,38:19

Can't figure this one out. Do not seem to have any WM_CONCAT or anything. we are on 10g r2.

Thanks everyone!

John Received on Thu Jul 03 2008 - 14:07:56 CDT

Original text of this message