SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Inserting names into a table,
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

soulchyld21
Starting Member

United Kingdom
28 Posts

Posted - 02/01/2012 :  04:58:33  Show Profile  Reply with Quote
I am trying to insert a name like O'Bailey into a table using an insert statement, however because I need to enclose my names in single quotes 'O'Bailey' (sql syntax) Im getting an error! how can I work around this?

webfred
Flowing Fount of Yak Knowledge

Germany
8766 Posts

Posted - 02/01/2012 :  05:14:34  Show Profile  Visit webfred's Homepage  Reply with Quote
Use another single quote to maske the other single quote:
'O''Bailey'


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

soulchyld21
Starting Member

United Kingdom
28 Posts

Posted - 02/01/2012 :  07:36:50  Show Profile  Reply with Quote
Thanks
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000