Comma separated ', '
SelectListagg (SUBSTR (To_char (Freestarttime,'YYYY-MM-DD HH24:MI:SS'), One,9) ||'~'||Trim (SUBSTR (To_char (Freeendtime,'YYYY-MM-DD HH24:MI:SS'), One,9)),',') withinGROUP(ORDER byTPF. Freeid) asFreetimespan fromTra_pricingberth TPB Left JOINTra_pricingfree TPF onTPB. Pricingstrategyid=TPF. PricingstrategyidWHERETPB. Berthcode='108211' andTPF. Freedatetype='1' SELECTListagg (sbpt. Parkstime||'~'||Sbpt. Parketime),',') withinGROUP(ORDER bysbpt. Parktimeid) asSaree fromSys_berthandtype SBT Left JOINSys_berthtypeparktime SBPT onSBT. Berthtypeid=sbpt. BerthtypeidWHERESBT. Berthcode='108211' andSbpt. Datetype= 1 andSbpt. Isallow=2 asNotallowtimespan
20:00:00~23:59:59, 00:00:00~07:29:00
separated by semicolons '; ' use trim to implement the SPACEBAR function
SelectListagg (SUBSTR (To_char (Freestarttime,'YYYY-MM-DD HH24:MI:SS'), One,9) ||'~'||Trim (SUBSTR (To_char (Freeendtime,'YYYY-MM-DD HH24:MI:SS'), One,9)),';') withinGROUP(ORDER byTPF. Freeid) asFreetimespan fromTra_pricingberth TPB Left JOINTra_pricingfree TPF onTPB. Pricingstrategyid=TPF. PricingstrategyidWHERETPB. Berthcode='108211' andTPF. Freedatetype='1' SELECTListagg (sbpt. Parkstime||'~'||Sbpt. Parketime),';') withinGROUP(ORDER bysbpt. Parktimeid) asSaree fromSys_berthandtype SBT Left JOINSys_berthtypeparktime SBPT onSBT. Berthtypeid=sbpt. BerthtypeidWHERESBT. Berthcode='108211' andSbpt. Datetype= 1 andSbpt. Isallow=2 asNotallowtimespan
20:00:00~23:59:59;00:00:00~07:29:00
Oracle Date merge separated by commas or semicolons