Consultation in bank with accentuation in the table

Asked

Viewed 301 times

0

I know it’s kind of absurd, but unfortunately I came across a situation I don’t know how to get around

The company has a system that records in Adobe ACCSSES 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.

And I need to perform the consultations with these characters only that of the stick at the time of performing, there is some way around this ?

SELECT * FROM Campanhas ORDER BY Código ASC
  • 1

    The problem with creating accented tables is that you’re really going to have a lot of problems with that. Windows may even have a certain propensity to do these things, but when doing an SQL query or even accessing through Linux, it will not have the expected behavior. The recommended is always to have the name of the tables without special characters, it facilitates your life and the life of those who will give future support to the bank

  • I also know that Isaias, plus the problem and that I can’t touch the structure of the client’s program

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 to cause some problem at the time of sending the "instructions" to the server, it would be more interesting to review and change everything to without accent:

Código => codigo
Ação => acao
Preço => preco
  • 1

    I also think William, however the program is old, the idea is to try to put in the customer’s head to change everything in the future, more for now I need this solution, and it worked! Thanks for the help!

0

  • I tried both options the column still gets accentuated Code

Browser other questions tagged

You are not signed in. Login or sign up in order to post.