Database merging duplicate records

Source: Internet
Author: User
Database merge duplicate record createorreplacefunctionstr_list (str_ininvarchar2) -- Category field returnvarchar2isstr_listvarchar2 ultnull; -- connected string strvarchar2 (20) defaultnull; www.2cto.com -- Connection Symbol beginforxin (select

Create or replace function str_list (str_in in varchar2) -- Category field return varchar2 is str_list varchar2 (4000) default null; -- string str varchar2 (20) default null after connection; www.2cto.com -- Connection Symbol begin for x in (select


Database merging duplicate records

Create or replace function str_list (str_in in varchar2)

-- Category field

Return varchar2 is

Str_list varchar2 (4000) default null;

-- Connected string

Str varchar2 (20) default null;

Www.2cto.com

-- Connection Symbol

Begin

For x in (select TEST. CITY from TEST

Where TEST. COUNTRY = str_in) loop

Str_list: = str_list | str | to_char (x. city );

Str: = ',';

End loop;

Return str_list;

End;

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.