Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update syntax with Replace and Cast
Message
 
 
To
06/04/2015 16:33:25
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01617831
Message ID:
01617848
Views:
22
>>This works as well for me:
>
>Text not NText.

Still working fine:
drop table #test
go
create table #test(Subject_E text)

insert into #test (Subject_E) values ('Testing [OldMemberTableName]'), ('Testing [OLDMEMBERTABLENAME]')

UPDATE #test SET Subject_E=replace(cast(Subject_E as varchar(max)) ,'[OldMemberTableName]','[Member]')
select * from #test
Please check what is the database collation and do you have collation for that column. Script both database and the table.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform