1
I have a somewhat curious problem, perhaps a challenge.
I need to add to my database the list of all cities in Brazil, I found an SQL with all the way I need, however, the name of the SQL table meets with "quotes" as in the following example:
INSERT INTO `tb_cidades` VALUES (0001, 01, 'AC', 'Acrelandia');
INSERT INTO `tb_cidades` VALUES (0002, 01, 'AC', 'Assis Brasil');
INSERT INTO `tb_cidades` VALUES (0003, 01, 'AC', 'Brasileia');
INSERT INTO `tb_cidades` VALUES (0004, 01, 'AC', 'Bujari');
INSERT INTO `tb_cidades` VALUES (0005, 01, 'AC', 'Capixaba');
I wonder, how do I create a simple script or algorithm, to change the name 'tb_cities' to cities. I have the list of all, only in one file . txt
An replace/replace does not solve the problem?
– rray
You are using Linux?
– Giuliana Bezerra
Here has an sql with all the cities of Brazil
– Marconi
Like I said, rray I’m with the list in . txt, I don’t know how to manipulate there;
– Igor Alisson
Giuliana Bezerra, yes
– Igor Alisson
Every text editor has the search/replace function no need for script.
– rray
True, Gedit for example has find/replace, you could use it. The default to replace would be:
tb_cidades
-> cities.– Giuliana Bezerra
Use any text editor.
– Roknauta
I didn’t know about these functions of the text editors, I was able to solve my problem thanks to you. Thank you guys!
– Igor Alisson