HLLY/JL_L01_01,有SQL语句或其他方法可以实现吗,要修改的记录条数有几千条,
尝试如下方法语法通不过,update ex_qm_st set left(编号,14)=HLLY/JL_L01_01
9 个解决方案
#1
replace(col , 'HLLY/JL-01-002' , 'HLLY/JL_L01_01')
#2
UPDATE ex_qm_st
SET 编号=STUFF(编号,1,14,'HLLY/JL_L01_01')
#3
update ex_qm_st set 编号 = replace(编号 , 'HLLY/JL-01-002' , 'HLLY/JL_L01_01')
#4
UPDATE ex_qm_st
SET 编号=STUFF(编号,1,14,'HLLY/JL_L01_01')
WHERE LEFT(编号,1,14)='HLLY/JL-01-002'
#5
Replace()
Stuff()
Stuff()
#6
--方法1
update ex_qm_st set 编号 = replace(编号 , 'HLLY/JL-01-002' , 'HLLY/JL_L01_01')
--方法2
update ex_qm_st set 编号 = 'HLLY/JL_L01_01' + substring(编号 , 15 , len(编号))
#7
UPDATE ex_qm_st SET 编号=STUFF(编号,1,14,'HLLY/JL_L01_01')
UPDATE ex_qm_st SET 编号='HLLY/JL_L01_01'+STUFF(编号,1,14,'')
都行
#8
update ex_qm_st set 编号 = 'HLLY/JL_L01_01' + substring(编号 , 15 , len(编号))
#9
--你的肯定行不通哈,要用replace
update ex_qm_st set 编号 = replace(编号 , 'HLLY/JL-01-002' , 'HLLY/JL_L01_01')
#1
replace(col , 'HLLY/JL-01-002' , 'HLLY/JL_L01_01')
#2
UPDATE ex_qm_st
SET 编号=STUFF(编号,1,14,'HLLY/JL_L01_01')
#3
update ex_qm_st set 编号 = replace(编号 , 'HLLY/JL-01-002' , 'HLLY/JL_L01_01')
#4
UPDATE ex_qm_st
SET 编号=STUFF(编号,1,14,'HLLY/JL_L01_01')
WHERE LEFT(编号,1,14)='HLLY/JL-01-002'
#5
Replace()
Stuff()
Stuff()
#6
--方法1
update ex_qm_st set 编号 = replace(编号 , 'HLLY/JL-01-002' , 'HLLY/JL_L01_01')
--方法2
update ex_qm_st set 编号 = 'HLLY/JL_L01_01' + substring(编号 , 15 , len(编号))
#7
UPDATE ex_qm_st SET 编号=STUFF(编号,1,14,'HLLY/JL_L01_01')
UPDATE ex_qm_st SET 编号='HLLY/JL_L01_01'+STUFF(编号,1,14,'')
都行
#8
update ex_qm_st set 编号 = 'HLLY/JL_L01_01' + substring(编号 , 15 , len(编号))
#9
--你的肯定行不通哈,要用replace
update ex_qm_st set 编号 = replace(编号 , 'HLLY/JL-01-002' , 'HLLY/JL_L01_01')