September 11, 2006 at 11:08 am
I am trying to run a following query
select * from employeedetails where edescription='employee name is 'john jackson' and state is 'ca''
its throwing an error because of the (') in where clause...
Can anyone suggest how I can rectify this query???
Thanks
Joel
Joel
September 11, 2006 at 11:23 am
If you want to parse in single-quotes, use two of them in your string:
select * from employeedetails where edescription='employee name is ''john jackson'' and state is ''ca'''
September 11, 2006 at 11:24 am
try this
select * from employeedetails where edescription='employee name is ''john jackson'' and state is ''ca'''
September 11, 2006 at 11:26 am
add another ' for every '
select * from employeedetails
where edescription='employee name is ''john jackson'' and state is ''ca'''
September 11, 2006 at 12:14 pm
Thank-you Guys for the help...I appended every ' with another '....
That worked
Joel
September 11, 2006 at 12:54 pm
They are covered under quoted identifiers and delimiters in ANSI SQL 1992. Try the link below for details from Microsoft. Hope this helps.
http://msdn2.microsoft.com/en-us/library/ms176027.aspx
Kind regards,
Gift Peddie
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply