Để replace 1 chuỗi Ntext, nếu replace thay thế thông thường ta sẽ không thể làm được và bị báo lỗi "Argument data type ntext is invalid for argument 1 of replace function". Để thay thế dữ liệu gì đó nằm trong 1 chuỗi Ntext của SQL server thì làm như sau: Mã: cast(replace(cast(myNtext as nvarchar(max)),'find','text_replace') as ntext) Với myNtext: là cột dữ liệu lấy để thay thế find : là ký tự, chuỗi ký tự cần tìm để thay thế. text_replace : dữ liệu cần thay thế. Sử dụng Select để Replace. Mã: select cast(replace(cast(myNtext as nvarchar(max)),'find','text_replace') as ntext) from mytable Sử dụng Update để Replace. Mã: update mytable set myNtext = cast(replace(cast(myNtext as nvarchar(max)),N'find',N'text_replace') as ntext) So sánh kiểu dữ liệu này : https://itseovn.com/threads/so-sanh-kieu-du-lieu-ntext-tim-isnull-trong-kieu-ntext-va-toan-tu.20914/