Use of the oracle wm_concat Function

Source: Internet
Author: User


The oracle wm_concat function uses the oracle wm_concat (column) function, which is frequently used. The following describes how to use the oracle wm_concat (column) function to merge fields, if you are interested in using the oracle wm_concat (column) function, take a look. Shopping: www.2cto.com u_id goods num ------------------------------------------ 1 Apple 2 pears 5 1 watermelon 4 3 grapes 1 3 bananas 1 1 orange 3 ================== ======= the expected result is: -------------------------------- u_id goods_sum ________________ 1 Apple, watermelon, orange www.2cto.com 2 pear 3 grape, banana ----------------------------------- select u_id, wmsys. wm_concat (goods) goods_sum from shopping group by u_id expected result 2: ---------------------------------- u_id goods_sum ____________ 1 Apple (2), watermelon (4), orange (3) www.2cto.com 2 (5) 3 grape (1), banana (1) ------------------------------------- use oracle wm_concat (column) function implementation: select u_id, wmsys. wm_concat (goods | '(' | num | 'jin) ') goods_sum from shopping group by u_id
 

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.