singlequote

TSQL varchar string manipulation problem

I have a variable which contains the following string: AL,CA,TN,VA,NY I have no control over what I get in that variable (comes from reporting services) I need to make it look like this: 'AL','CA','TN','VA','NY' How do I do this? ...

Question about mysql_real_escape_string and single quote

Hey everyone, I'm quite frustrated. I want to be able to insert into my database names with single quotes - for example, O'Connor. So, when inserting into the DB, I do: $lname = mysql_real_escape_string($_POST['lname']); And then I insert $lname into the DB. When it's in the DB, it appears as O\'Connor. So, if I were to recall th...

select rows from dataTable - Issue with the values which have singlequote

Hi, I have a .net datatable...from which I am filtering rows using datatable' select function Assume the datatable as below Id | Name | Description | 1 | Anish| "sachin's centuary" | If I search my datatable as... datatable.select("Description = 'sachin's centuary'")...it is not returning any rows because of the "sin...