SQL> select trim(' abc ') trim from dual;TRI --- abc
那我clob字段怎么trim呢,DBMS_LOB也有trim方法,不过好像和一般的trim不一样,是这样定义的: This procedure trims the value of the internal LOB to the length you specify in the newlen parameter. DBMS_LOB.TRIM ( lob_loc IN OUT NOCOPY CLOB CHARACTER SET ANY_CS, newlen IN INTEGER);
我想找到第一个回车的位置position := DBMS_LOB.Instr(v_CLOBLocator, chr(10));是63,
然后我要把这个clob的前63个字符切掉,DBMS_LOB.erase(v_CLOBLocator, position, 1);
这样clob里的数据,第一行的确没了,可是第二行数据第一个字符前莫名其妙的多出好多空格符。我以为是少减了一个字符的关系,所以给position+1再次erase,可这次第二行的第一个字符也被切掉了。那么那些空格符怎么去掉呢?
---
abc
This procedure trims the value of the internal LOB to the length you specify in the newlen parameter.
DBMS_LOB.TRIM (
lob_loc IN OUT NOCOPY CLOB CHARACTER SET ANY_CS,
newlen IN INTEGER);
whan1234:你看该用什么方法呢?