Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update syntax with Replace and Cast
Message
 
 
À
06/04/2015 16:33:25
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01617831
Message ID:
01617848
Vues:
21
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform