use hbposev9 go update t_bd_item_info set item_subno=RIGHT(ltrim(rtrim(item_no)),6) where LEN(ltrim(rtrim(item_no)))>=6 go