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
 General SQL Server Forums
 New to SQL Server Programming
 Probably a simple question

Author  Topic 

Nicole_0904
Starting Member

2 Posts

Posted - 2006-04-19 : 10:42:54
select count(*) from oncd_contact where cst_title = 'DON'T SEND MAILERS'

How do I run queries when there is an ' in the data? I need to find all entries from oncd_contact where the title is DON'T SEND MAILERS.

Thanks.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-04-19 : 10:44:13
use two single quote



KH


Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-19 : 10:48:15
or

'DON'+char(39)+'T SEND MAILERS'


Madhivanan

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

Nicole_0904
Starting Member

2 Posts

Posted - 2006-04-19 : 10:51:21
Thank you both!
Go to Top of Page
   

- Advertisement -