sql
[mssql] text필드에 replace 하기
앙되요
2014. 8. 21. 16:24
많은 데이터를 변경해야 될 일이 생겼다.
그래서 찾아보니 그냥 replace만 하면 된다기에 해봤드만....
text필드라서 안된단다;;;
그래서 어떻게하지? 라는 생각에 한번 convert를 써서 해봤다.
된다!!
그래서 남긴다.
시작할땐 항상 begin tran 쓰기!
begin tran
update TB_QUEST_ITEM
set EXAMPLE = replace(convert(varchar(4000),EXAMPLE),'원본','변경할데이터')
where EXAMPLE like '원본'
commit