View with a search for a field containing special characters
Posted by: Roberto Compare
Date: July 18, 2017 06:57AM

Hello to all,

I'm trying to fix a problem that is creating several scratches, I have a table in which I have a 4-character field some of these are special characters or from 127 on as the following string "I-" I have to be able to intercept and count them. With access the thing works but with mysql me by error: mysql illegal mix of collation (latin 1 swedish_ci, IMPLICIT) and (utf8_general_ci, COERCIBLE) for operazion ...

I tried trying to change collation but without success, I used both for the schema and for the tables the same collation:
ALTER TABLE `My tables`.`T_TOTALI_D` CHARACTER SET = utf8;

My query is more or less this, I missed the count because the condition is not resolved, TEST2 was only set to show consistency:

SELECT
`T_TOTALI_D``TOTALI_DATA` AS` TOTALI_DATA`,
IF ((TRIM (`T_TOTALI_D``TOTALI_MANS`) = ''),
'-',
IF ((LOCATE ('ÄÕ¹', LEFT (`T_TOTALI_D`.`TOTALI_MANS`, 1) <> 0)
'S',
'N')) AS `TEST2`
FROM
`T_TOTALI_D`
WHERE
(LEFT (`T_TOTALI_D`.`TOTALI_MANS`, 1) = 'Ä')

I would like to understand where I'm wrong, in advance thank you.

Options: ReplyQuote


Subject
Views
Written By
Posted
View with a search for a field containing special characters
3236
July 18, 2017 06:57AM


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.