title: SQL Query, for each row in table A should fetch multiple row values (one column) as comma separated in result
body: <p>Below I describe the tables and explain the query I'm trying to write,</p>
  
  <p>The Visit Table</p>
  
  <pre><code>+--------------+------------------+--------+-------+-----------+
  |   FIELD      |      TYPE        | NULL   | KEY   | DEFAULT   |
  +--------------+------------------+--------+-------+-----------+
  | VISIT_ID     | VARCHAR(200)     | NO     | UNI   | NULL      |
  | PATIENT      | VARCHAR(45)      | NO     | PRI   | NULL      |
  | DOCTOR       | VARCHAR(45)      | NO     | PRI   | NULL      |
  | COMPLAINTS   | CLOB(2147483647) | YES    |       | NULL      |
  | OBSERVATIONS | CLOB(2147483647) | YES    |       | NULL      |
  | REPORTS      | VARCHAR(500)     | YES    |       | NULL      |
  | START        | TIMESTAMP(23)    | NO     | PRI   | NULL      |
  | END          | TIMESTAMP(23)    | NO     | PRI   | NULL      |
  | CREATED_ON   | DATE(8)          | NO     | PRI   | NULL      |
  | UPDATED_ON   | DATE(8)          | YES    |       | NULL      |
  | STATUS       | VARCHAR(200)     | NO     | PRI   | NULL      |
  | TYPE         | VARCHAR(200)     | YES    |       | NULL      |
  | DESCRIPTION  | VARCHAR(200)     | NO     |       | NULL      |
  +--------------+------------------+--------+-------+-----------+
  </code></pre>
  
  <p>And Highlight table</p>
  
  <pre><code>+----------+------------------+--------+-------+-----------+
  | FIELD    |      TYPE        | NULL   | KEY   | DEFAULT   |
  +----------+------------------+--------+-------+-----------+
  | VISIT_ID | VARCHAR(200)     | NO     |       | NULL      |
  | MATTER   | CLOB(2147483647) | NO     |       | NULL      |
  +----------+------------------+--------+-------+-----------+
  </code></pre>
  
  <p>Now what I'm trying to query is, for each VISIT from the visit table I want to fetch multiple records in the Highlight table. I can use inner join but it gives me duplicate visit records (see below the SQL)</p>
  
  <pre><code>select "PUBLIC"."VISIT"."VISIT_ID", "PUBLIC"."VISIT"."DESCRIPTION", "PUBLIC"."VISIT"."START", "PUBLIC"."HIGHLIGHTS"."MATTER" from "PUBLIC"."VISIT", "PUBLIC"."HIGHLIGHTS" where "PUBLIC"."VISIT"."VISIT_ID" = "PUBLIC"."HIGHLIGHTS"."VISIT_ID" order by "PUBLIC"."VISIT"."START" asc
  </code></pre>
  
  <p>this will return the following result:</p>
  
  <pre><code>+------------------+-------------+-------------------------+-------------+
  |     VISIT_ID     | DESCRIPTION |          START          |   MATTER    |
  +------------------+-------------+-------------------------+-------------+
  | 5178231763512765 | Head Ache   | 2014-05-07 23:08:10.383 | HIGH BP     |
  | 5178231763512765 | Head Ache   | 2014-05-07 23:08:10.383 | SUGAR       |
  | 5178231763512765 | Head Ache   | 2014-05-07 23:08:10.383 | BROKEN BONE |
  +------------------+-------------+-------------------------+-------------+
  </code></pre>
  
  <p>But what I want is something like below:</p>
  
  <pre><code>+------------------+-------------+-------------------------+---------------------------+
  |     VISIT_ID     | DESCRIPTION |          START          |          MATTER           |
  +------------------+-------------+-------------------------+---------------------------+
  | 5178231763512765 | Head Ache   | 2014-05-07 23:08:10.383 | HIGH BP~SUGAR~BROKEN BONE |
  +------------------+-------------+-------------------------+---------------------------+
  </code></pre>
  
  <p>Some can help how to write query to get the data like the above? the "matter" can be any variable if required.</p>