May 16, 2006 at 3:03 pm
Hello SQLers.
This sounds like a really dumb question but I'm really stumped on this one.
I have a database table with a column NAME (which is a string) and there are entries in this column with apostrophes. When I try to execute a simple query like
select * from ThisTable where Name = 'Mike's Ball'
I have an error because of the apostraphe in Mike. If I am allowed to write this character, I'm assuming there is a way to query it .... I JUST CAN'T FIGURE OUT WHAT IT IS! HELP! I'M GOING CRAZY MAN!!
May 16, 2006 at 3:06 pm
select * from ThisTable where Name = 'Mike''s Ball'
hth
David
May 16, 2006 at 3:09 pm
You should also take a look at QUOTENAME:
http://msdn2.microsoft.com/en-us/library/ms176114(SQL.90).aspx
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply