1

Is it possible to convert instructions from MySql to SQlite using some tool on MAC ? I have many instructions in MySqlite for inserting into tables and I need to insert in sqlite, and it would take a lot of time for changing the instructions into sqlite format for inserting.

A MySql instruction

INSERT INTO language_translation_fr(id_translation, content) VALUES
(2001, 'ABIDJAN LAGUNES'),
(2002, 'SUD-OUEST'),
(2003, 'NORD-OUEST'), 
(2004, 'CENTRE-EST')

in SQlite looks like :

INSERT INTO language_translation_fr
      SELECT 2001 AS 'column1', 'ABIDJAN LAGUNES' AS 'column2'
UNION SELECT 2002, 'SUD-OUEST'
UNION SELECT 2003, 'NORD-OUEST'
UNION SELECT 2004, 'CENTRE-EST'
Cœur
  • 37,241
  • 25
  • 195
  • 267
Gabrielle
  • 4,933
  • 13
  • 62
  • 122
  • I think there is no such tool :( – Caner Jul 17 '12 at 08:41
  • Where are these sql instructions? In separate files, or embedded to some other code? – biziclop Jul 17 '12 at 08:55
  • in separate files, one file for each table. For a table I have about 11.000 instructions for inserting in multiples rows, like the example that I put in my question. – Gabrielle Jul 17 '12 at 08:59
  • It looks like The MySQL insert query should be able to run in sqlite too. Why not just run it without any convert? http://www.sqlite.org/lang_insert.html – lucemia Jul 18 '12 at 01:13
  • http://stackoverflow.com/questions/3890518/convert-mysql-to-sqlite http://www.sqlite.org/cvstrac/wiki?p=ConverterTools – lucemia Jul 18 '12 at 16:38
  • I solved my problem. I edited all the instructions (with the help of Find&Replace) and like this I inserted into my database. It seems that there is no such tool. – Gabrielle Jul 19 '12 at 06:49

0 Answers0