code
"M.101.5.2"
"M.101.5.3"
"M.101.22.4"
"M.101.11.15"
得到
pcode
"M.101.5"
"M.101.5"
"M.101.22"
"M.101.11"
select code,substring(code,'^M.\d+.\d+') as pcode from table
code
"M.101.5.2"
"M.101.5.3"
"M.101.22.4"
"M.101.11.15"
得到
pcode
"M.101.5"
"M.101.5"
"M.101.22"
"M.101.11"
select code,substring(code,'^M.\d+.\d+') as pcode from table