I am trying to insert the values like this:
INSERT INTO `paises`.`moneda` (`mon_id`, `moneda`, `abr`, `tipoCambio`, `singPlur`, `caracter`,`mn` ,`img16`, `img24`, `img32`, `status`)
VALUES (1, PESO MEXICANO, MXN, 18.7000, PESO:PESOS, $, 1,?,?,?,1);
I want to put them in a script .sql
and later execute it with a file.bat
@ECHO OFF
ECHO Insertando Datos...
"C:\Users\Winchester\Desktop\mysql.exe" -u root --password=javac -P 3306 < "C:\Users\Winchester\Desktop\insertar-monedas.sql"
ECHO Completado
pause
But I get the error of
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MEXICAN, MXN, 18.7000, PESO:PESOS, $, 1,?,?,?,1)' at line 2
Cheers,
I create
.bat
the following way:and the SQL I just save it as
DesbloqueoUsuarios.sql
and then with a windows task I run it daily. Well, that's the idea, and from there you adapt it.
The quotes were missing on the line
VALUES