Aug 22, 2005 #1 bmann Programmer Oct 8, 2002 128 US How do I Select records with Apostrophe in DATA. Example: O'Neil Here is my code: select top 5 * from cal.dbo.name where lastname = 'O'NEIL%' SQL Analyser does not like this code. I would appreciate anyone's help.
How do I Select records with Apostrophe in DATA. Example: O'Neil Here is my code: select top 5 * from cal.dbo.name where lastname = 'O'NEIL%' SQL Analyser does not like this code. I would appreciate anyone's help.
Aug 22, 2005 #2 DotNetGnat Programmer Mar 10, 2005 5,548 IN Code: select top 5 * from cal.dbo.name where lastname = 'Replace(O'NEIL,"'","''")%' -DNG Upvote 0 Downvote
Aug 22, 2005 #3 PHV MIS Nov 8, 2002 53,708 FR select top 5 * from cal.dbo.name where lastname = 'O''NEIL%' Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
select top 5 * from cal.dbo.name where lastname = 'O''NEIL%' Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886