ORACLE multiple columns merged into a single row of data wm_concat functions and replace

Source: Internet
Author: User

SELECT(--SELECT REPLACE (sbpt. parkstime| | ' ~ ' | | Sbpt. Parketime, ', ') replace can also  SELECTWm_concat (sbpt. Parkstime||'~'||sbpt. Parketime) Saree fromSys_berthandtype SBT Left JOINsys_berthtypeparktime sbpt onSBT. Berthtypeid=Sbpt. BerthtypeidWHEREBerthcode='114163'  andsbpt. Datetype= 1  andSbpt. Isallow= 2) Notallowtimespan, Wm_concat (SUBSTR (To_char (Freestarttime,'YYYY-MM-DD HH24:MI:SS'), One,9)||'~'||SUBSTR (To_char (Freeendtime,'YYYY-MM-DD HH24:MI:SS'), One,9)) Freetimespan fromTra_pricingberth TPB Left JOINTra_pricingfree TPF onTPB. Pricingstrategyid=TPF. PricingstrategyidWHEREBerthcode='114163'  andFreedatetype=1 GROUP  byBerthcode

Wm_concat merged into a row data column data volume assembly exceeds character length

SELECT wm_concat (sbpt. Parkstime| | ' ~ ' ||  from Sys_berthtypeparktime SBPT

REPLACE into multiple columns
SELECT  REPLACE (SBPT. Parkstime| | ' ~ ' || Sbpt. Parketime,',' from Sys_berthtypeparktime sbpt

ORACLE multiple columns merged into a single row of data wm_concat functions and replace

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.