update 表 set 字段='A-04'+right(字段,len(字段)-4) where left(字段)='A-01'

解决方案 »

  1.   

    更正一下:
    update 表 set 字段='A-04'+right(字段,len(字段)-4) where left(字段,4)='A-01'
      

  2.   

    update 表 set 字段 = replace(字段,'A-04','A-01')
      

  3.   

    try:declare @au_lname varchar(40),@au_fname varchar(40)
    declare authors_cur CURSOR  scroll for
    select toma,ma from sheet1$ WHERE ma=toma
    open authors_cur
    fetch next from authors_cur
    into @au_lname,@au_fname
    while @@fetch_status=0
    begin 
    update sheet1$ set ma= replace (@au_lname,'A-01','A-04')  where toma= @au_fname 
    fetch next from authors_cur
    into @au_lname,@au_fname
    end
    close authors_cur
    deallocate authors_cur
      

  4.   

    update 你的表 set 字段 = replace(字段,'A-01','A-04')
      

  5.   

    update yourtable set colname = replace(colname,'A-01','A-04') 
    where left(colname,4) = 'A-01'