Bank query with accent on the table

0

I know it's kind of absurd, but unfortunately I came across a situation that I do not know how to circumvent.

The company has a system that records in ACCSSES baco and some tables theme accentuation and special characters Ex: Code - Action - Price

And I installed a program that converts the database to MYSQL and sends it to my server once a day, and updates the database

But the tables also go up with the special characters.

I need to perform the queries with these characters only when the time comes to perform, is there any way to get around this?

SELECT * FROM Campanhas ORDER BY Código ASC
    
asked by anonymous 26.07.2017 / 15:35

2 answers

1

Use the inverted accent:

 SELECT * FROM Campanhas ORDER BY 'Código' ASC

I personally find it a bad idea to use accents in column names, this will always have a chance of causing some problem when sending the "instructions" to the server, it would be more interesting to review and change everything to no accent:

Código => codigo
Ação => acao
Preço => preco
    
26.07.2017 / 16:49
0

Put this in your bank

ALTER DATABASE 'sua_base' CHARSET = Latin1 COLLATE = latin1_swedish_ci;

More information follows the link - > Which character encoding (Collation) should I use in Mysql? Note I recommend that you use utf8 instead of latin

    
26.07.2017 / 15:47