Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
kamii47
Constraint Violating Yak Guru
353 Posts |
Posted - 2011-12-28 : 11:25:08
|
I have field in which i wanated to replace case sentivelydeclare @segccategory varchar(20) set @segccategory = 'afdfdfF' select @segccategory = REPLACE(@segccategory, 'F', 'LTRS'); select @segccategoryResult should be 'afdfdfLTRS'but currently it is showing 'aLTRSdLTRSdLTRSLTRS'Kamran ShahidPrinciple Engineer Development(MCSD.Net,MCPD.net) |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-28 : 11:38:57
|
for that you need make column case sensitive. something like belowdeclare @segccategory varchar(20) set @segccategory = 'afdfdfF'select @segccategory = REPLACE(@segccategory collate SQL_Latin1_General_CP1_CS_AS, 'F', 'LTRS');select @segccategory ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
kamii47
Constraint Violating Yak Guru
353 Posts |
Posted - 2011-12-28 : 12:10:40
|
ThanksKamran ShahidPrinciple Engineer Development(MCSD.Net,MCPD.net) |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-28 : 12:15:07
|
wc------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
Kristen
Test
22859 Posts |
Posted - 2011-12-29 : 14:38:21
|
quote: Originally posted by visakh16 ... collate SQL_Latin1_General_CP1_CS_AS ...
Pro's and Con's of SQL_Latin1_General_CP1_CS_AS v. Latin1_General_BIN2 ?? |
|
|
|
|
|