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 |
|
treeskin
Starting Member
22 Posts |
Posted - 2007-11-22 : 20:15:25
|
| Hi,I would like to know how to write a query where its condition contains apostrophe (')?Query I wrote which return error:SELECT bookname, author, publish_dateFROM aLibraryWHERE bookname = 'AA'S'Appreciate your sharing. Thanks... |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-11-22 : 21:21:39
|
need to double up on the single quotes:SELECT bookname, author, publish_dateFROM aLibraryWHERE bookname = 'AA''S'also need to read BOL. elsasoft.org |
 |
|
|
treeskin
Starting Member
22 Posts |
Posted - 2007-11-22 : 22:37:07
|
| hi jezemine, thanks... it works..what is BOL? any URL can be provided for more info? |
 |
|
|
suresha_b
Yak Posting Veteran
82 Posts |
Posted - 2007-11-22 : 23:16:17
|
| BOL = Books OnLine.It is intalled in your computer. URL is not necessary.Start->All Programs->Microsoft SQL Server 2005->Documents and Tutorials->SQL Server Books Online |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-11-23 : 02:00:51
|
| To understand the behaviour of single quote, run this and seeselect '','''','''''','''''''',''''''''''MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|