oracle分割字符串split 請問如何在Oracle中截取第一個逗號和第二個逗號之間的字符串?
請問如何在Oracle中截取第一個逗號和第二個逗號之間的字符串?Substr(string,start position,truncation number)使用上述函數(shù)完成判斷如果是查詢select
請問如何在Oracle中截取第一個逗號和第二個逗號之間的字符串?
Substr(string,start position,truncation number)
使用上述函數(shù)完成判斷
如果是查詢
selectcasesubstr(field,1,1)
when“,”then Substr(field,2,length(field)-1)
else field
endas field name
from table
在Oracle中,可以使用connect by進(jìn)行除法字符串井:例如,定義字符串:PVuNouList:=“23,34,45,56”選擇不同的REGEXPuSubStr(PVuNouList,“[^,]”,1,LEVEL)作為來自DUALCONNECT的“token”,由REGEXPuSubStr(PVuNouList,“[^,]”,1,LEVEL)不為null按1順序返回結(jié)果:token23344556
Oracle“,,,,,,,;,,,”分別取輸出雙精度字符串中第一個逗號
ect substr(string,instr(string,“,”,1)1,instr(string,“,”,instr(string,”,“,1)1)-instr(string,“,”,1)-1)之間的字符