jDowdle.com header image 1

Entries Tagged as 'MySql'

Finding international characters with MySQL

August 19th, 2009 · Comments Off · MySQL

I recently had to find the rows in a database that contained any multibyte characters. My first thought was to leverage the difference between length() and char_length(). The query would be similiar to this:
Select pKey, dataCol
From myTable
Where length(dataCol) != char_length(dataCol)
To my surprise this query didn’t work. After mulling it over in my mind, I tried [...]

[Read more →]

Tags:·

MySQL Concat() and Mixed Types

February 5th, 2009 · Comments Off · Code, coldfusion

While in the process of upgrading our connector/J to version 5.1 we started seeing the following error:
ComplexByteArrayException: ByteArray objects cannot be converted to strings.
After doing a little homework we found that the root cause was in the way that CONCAT() processed numbers. CONCAT() was returning a binary string due to having both numbers and strings [...]

[Read more →]

Tags:···