Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
REPLACE apostrophe
Message
 
 
To
26/06/2008 12:25:33
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01326975
Message ID:
01326976
Views:
15
>I need to replace an apostrophe with an empty string. How do I do that? This gives an error.
>
>SET @DocumentName = REPLACE(@DocumentName,'''','')	
>
declare @Doc varchar(max)
set @Doc = 'test''test'
set @doc = replace(@Doc,quotename(''''),'')
set @Doc = 'test''test'
set @doc = replace(@Doc,'''','')
select @doc
You're missing one extra '
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform