A function wmsys in oracle 10g and 11g. wmsys. the function of wm_concat is to merge multiple rows into one row. For example, if A person buys three stocks A, B, and C, we will record three data records normally, now we want to display the stock of this person with a piece of data. This is wmsys. the wm_concat method is useful. however, in 10 Gb, the return value of this method can be directly converted to String for use, but it is Clob type in 11g, you must convert clob to String or another type before using/*** to convert CLOB to String. The static method * @ param clob field * @ return indicates the content String. If an error occurs, returns null */public final static String clob2String (Clob clob) {if (clob = null) {www.2cto.com return null;} StringBuffer Sb = new StringBuffer (65535); // 64 K Reader clobStream = null; // create an input stream object try {clobStream = clob. getCharacterStream (); char [] B = new char [60000]; // get 60 K int I = 0 each time; while (I = clobStream. read (B ))! =-1) {sb. append (B, 0, I) ;}www.2cto.com} catch (Exception ex) {sb = null;} finally {try {if (clobStream! = Null) clobStream. close ();} catch (Exception e) {}} if (sb = null) return null; else return sb. toString ();}