Solve the problem of insufficient length of wm_concat function

Source: Internet
Author: User

1 --Create Type2 CREATE OR REPLACETYPE "T_link_lob" asOBJECT3 (4 V_lob CLOB,5STATICFUNCTIONOdciaggregateinitialize (sctxinchOut NOCOPY t_link_lob)6     RETURN  Number,7MEMBERFUNCTIONOdciaggregateiterate (selfinchOut NOCOPY T_link_lob,8VALUEinch VARCHAR2)RETURN  Number,9MEMBERFUNCTIONOdciaggregateterminate (selfinchT_link_lob,Ten returnvalue out NOCOPY CLOB, OneFLAGSinch  Number) A     RETURN  Number, -MEMBERFUNCTIONOdciaggregatemerge (selfinchOut NOCOPY T_link_lob, -CTX2inchT_LINK_LOB)RETURN  Number the ); -  - --Create type content - CREATE OR REPLACETYPE BODY T_link_lob is +STATICFUNCTIONOdciaggregateinitialize (sctxinchOut NOCOPY t_link_lob) -     RETURN  Number  is +   BEGIN ASctx:=T_link_lob (NULL); at Dbms_lob. Createtemporary (Sctx. V_lob, TRUE, Dbms_lob. SESSION); -Dbms_lob.OPEN(Sctx. V_lob, Dbms_lob. Lob_readwrite); -     RETURNOdciconst. SUCCESS; -   END; -  -MEMBERFUNCTIONOdciaggregateiterate (selfinchOut NOCOPY T_link_lob, inVALUEinch VARCHAR2)RETURN  Number  is -   BEGIN toDbms_lob. Writeappend (self. V_lob, LENGTH (VALUE)+ 1, VALUE|| ','); +     RETURNOdciconst. SUCCESS; -   END; the  *MEMBERFUNCTIONOdciaggregateterminate (selfinchT_link_lob, $ returnvalue out NOCOPY CLOB,Panax NotoginsengFLAGSinch  Number)RETURN  Number  is -   BEGIN the Dbms_lob. Createtemporary (ReturnValue, TRUE, Dbms_lob. Call); + Dbms_lob. COPY (ReturnValue, A Self . V_lob, theDbms_lob. GetLength (self. V_LOB)- 1); +     RETURNOdciconst. SUCCESS; -   END; $  $MEMBERFUNCTIONOdciaggregatemerge (selfinchOut NOCOPY T_link_lob, -CTX2inchT_LINK_LOB)RETURN  Number  is -   BEGIN the     NULL; -     RETURNOdciconst. SUCCESS;Wuyi   END; the END; -  Wu --Create a function - CREATE OR REPLACE FUNCTIONF_link_lob (p_strVARCHAR2)RETURNCLOB AGGREGATE USING t_link_lob; About  $ --Invocation Mode - SelectF_link_lob (D.SID) fromPmp_p_info D;

Solve the problem of insufficient length of wm_concat function

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.