Avatar of Stef Merlijn
Stef Merlijn
Flag for Netherlands asked on

Replace NOT CaseSensitive

Hi,

Following code I use the replace a string is a field.

UPDATE Communication SET Documentname  = REPLACE(Documentname, @vBasisMapDocumenten, '')

How can I make this Case Insensitive?
Microsoft SQL Server 2008

Avatar of undefined
Last Comment
Stef Merlijn

8/22/2022 - Mon
chapmandew

I assume it is not finding the value, right?  

could try this:

UPDATE Communication SET Documentname  = REPLACE(Documentname, @vBasisMapDocumenten, '') SQL_Latin1_General_CP1_CI_AS
ASKER CERTIFIED SOLUTION
Guy Hengel [angelIII / a3]

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
chapmandew

forgot the collate part:

UPDATE Communication SET Documentname  = REPLACE(Documentname, @vBasisMapDocumenten, '') COLLATE SQL_Latin1_General_CP1_CI_AS
Stef Merlijn

ASKER
Thank you all.
Apparently the default for all created databases is Latin1_General_CI_AS which is case insensitive.
My filed had this set to the .
The additional info from the website was very helpfull.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck