Re: #HY000Illegal mix of collations for operation 'concat'
Brennon
Yes, this syntax will be required but less often. The problem is occuring when a literal (in this case '<fieldvalue>' is the literal) is sent to the server in one charset and compared to a column of another charset. This comparison is happening in your SQL because you are doing "WHERE <field> = '<fieldvalue>'. The driver is using utf-8 to send the SQL over (so the literal is utf-8) but the field it is comparing to is latin1. The reason it works with the CONVERT function is becuase that function is executing on the server and is converting the utf-8 string to latin1 before the comparison.
Once 1.0.2 is out, you can specify what charset the driver should use so if all your tables are using latin1 (for example) you can set latin1 on your connection string and you won't have to use CONVERT() for your SQL.
However, if you ever had columns or tables in your db that used a different charset than the default you specified (maybe your website supports multiple languages and your errors table has messages in several languages) and you needed to do comparisons using that non-default charset, you would have to use CONVERT in that case.
Hope this clears it up.
-reggie
Subject
Written By
Posted
November 05, 2004 03:13PM
November 09, 2004 07:56AM
November 09, 2004 03:59PM
November 10, 2004 08:17AM
November 11, 2004 07:18PM
November 12, 2004 12:19AM
November 13, 2004 03:30PM
November 14, 2004 04:58AM
Re: #HY000Illegal mix of collations for operation 'concat'
November 14, 2004 09:06AM
November 14, 2004 10:33AM
November 15, 2004 02:30PM
November 15, 2004 09:35AM
November 12, 2004 02:02AM
November 12, 2004 09:41AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.