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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 how to escape single quote

Author  Topic 

EetieD
Starting Member

5 Posts

Posted - 2008-08-06 : 06:07:59
Hello,

I was wondering how to escape a single quote (') in a INSERT string. I already tried backspace, but that is not it. Maybe someone can help? Thanks.

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-08-06 : 06:14:24
Use it twice

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2008-08-06 : 06:14:43
You can escape a single quote with another single quote.

Webfred
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2008-08-06 : 06:15:37
Arrgh - 19 sec
Go to Top of Page

bjoerns
Posting Yak Master

154 Posts

Posted - 2008-08-06 : 06:27:07
Now I tried backspace twice, but it just happens to delete two characters before the single quote j/k
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-08-06 : 06:29:24
quote:
Originally posted by bjoerns

Now I tried backspace twice, but it just happens to delete two characters before the single quote j/k


What I meant is "Use single quote twice"

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -