RE: **[SPAM]** Backslash \ in query

2004-10-04 Thread Jay Blanchard
[snip]
What's the deal w/ backslash?
[/snip]

It is an escape character. In order to get things with backslashes, as
you have deduced, you 

SELECT \\

Do you have a column '\'? If so, why?

Backslashes are often used in this way...


SELECT businessName FROM table WHERE businessName = 'Doc\'s';

Because the apostrophe in Doc's would cause the field to be read as
'Doc', but escaping the apostrophe allows it to be searched properly.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: **[SPAM]** Backslash \ in query

2004-10-04 Thread Jeff Burgoon
I'm populating a new table from excel sheets and for some silly reason
several column values are populated with \ (not my doing!).

I can easily fix the problem but I was just wondering.

Thanks Everyone.


Jay Blanchard [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[snip]
What's the deal w/ backslash?
[/snip]

It is an escape character. In order to get things with backslashes, as
you have deduced, you

SELECT \\

Do you have a column '\'? If so, why?

Backslashes are often used in this way...


SELECT businessName FROM table WHERE businessName = 'Doc\'s';

Because the apostrophe in Doc's would cause the field to be read as
'Doc', but escaping the apostrophe allows it to be searched properly.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]