RE: Using replace on columns containing *

2006-06-27 Thread J.R. Bullington
Part of the problem is that you have a ' ' in between your REPLACE and your
(). The REPLACE function needs to have that space removed.

SELECT REPLACE(deviceID,'*','.*') FROM MY_TABLE;

Try that and see if it helps.

J.R.

-Original Message-
From: Eitan Gur [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 27, 2006 9:07 AM
To: mysql@lists.mysql.com
Subject: Using replace on columns containing *

Hi all

 

I have a column in a table containing strings with the '*' character. I'm
trying to use the REPLACE command on this column:

SELECT REPLACE (deviceId, '*', '.*') FROM MY_TABLE;

 

But I get the following error:

ERROR 1270 (HY000): Illegal mix of collations (utf8_bin,IMPLICIT),
(latin1_swedish_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation
'replace' 

 

I use WindowsXP with MySQL version 4.1.7.

 

How can I overcome this problem?

 

Thanks.

 



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



RE: Using replace on columns containing *

2006-06-27 Thread Eitan Gur
Hi J.R.

Thanks for your response, but this did not help. If I try the same syntax on 
other values (not '*') I have no problem...



-Original Message-
From: J.R. Bullington [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 27, 2006 3:22 PM
To: mysql@lists.mysql.com
Subject: RE: Using replace on columns containing *

Part of the problem is that you have a ' ' in between your REPLACE and your
(). The REPLACE function needs to have that space removed.

SELECT REPLACE(deviceID,'*','.*') FROM MY_TABLE;

Try that and see if it helps.

J.R.

-Original Message-
From: Eitan Gur [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 27, 2006 9:07 AM
To: mysql@lists.mysql.com
Subject: Using replace on columns containing *

Hi all

 

I have a column in a table containing strings with the '*' character. I'm
trying to use the REPLACE command on this column:

SELECT REPLACE (deviceId, '*', '.*') FROM MY_TABLE;

 

But I get the following error:

ERROR 1270 (HY000): Illegal mix of collations (utf8_bin,IMPLICIT),
(latin1_swedish_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation
'replace' 

 

I use WindowsXP with MySQL version 4.1.7.

 

How can I overcome this problem?

 

Thanks.

 



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


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



RE: Using replace on columns containing *

2006-06-27 Thread Eitan Gur
Hi all

I found the problem:
It was not related to the '*' what-so-ever, but to the way I started my console 
client.
If I load it with --default-character-set=utf8 - the problem is solved (as my 
table is set to have utf8 charset).

Thanks.

-Original Message-
From: Eitan Gur [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 27, 2006 5:27 PM
To: mysql@lists.mysql.com
Subject: RE: Using replace on columns containing *

Hi J.R.

Thanks for your response, but this did not help. If I try the same syntax on 
other values (not '*') I have no problem...



-Original Message-
From: J.R. Bullington [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 27, 2006 3:22 PM
To: mysql@lists.mysql.com
Subject: RE: Using replace on columns containing *

Part of the problem is that you have a ' ' in between your REPLACE and your
(). The REPLACE function needs to have that space removed.

SELECT REPLACE(deviceID,'*','.*') FROM MY_TABLE;

Try that and see if it helps.

J.R.

-Original Message-
From: Eitan Gur [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 27, 2006 9:07 AM
To: mysql@lists.mysql.com
Subject: Using replace on columns containing *

Hi all

 

I have a column in a table containing strings with the '*' character. I'm
trying to use the REPLACE command on this column:

SELECT REPLACE (deviceId, '*', '.*') FROM MY_TABLE;

 

But I get the following error:

ERROR 1270 (HY000): Illegal mix of collations (utf8_bin,IMPLICIT),
(latin1_swedish_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation
'replace' 

 

I use WindowsXP with MySQL version 4.1.7.

 

How can I overcome this problem?

 

Thanks.

 



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


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


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