You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Importing the .sql file into MySQL/MaraiDB results in errors:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INSERT INTO auspostcodes (otherid, pcode,locality,state,auspostcodes.long,l...' at line 2
The issue seems to be with the table name and column names in the INSERT INTO statement. The column names shouldn't be prefixed with the table name (at least from MySQL's point of view).
Importing the .sql file into MySQL/MaraiDB results in errors:
The issue seems to be with the table name and column names in the INSERT INTO statement. The column names shouldn't be prefixed with the table name (at least from MySQL's point of view).
Here is the corrected SQL statement using backticks to quote the reserved words:
Here is a
sed
command to do a bulk change to the SQL file:The other error the came up was that a semi-colon
;
is needed between eachinsert
statement.Here is another sed command to fix this:
After these changes I was able to import the .sql file into MariaDB.
The text was updated successfully, but these errors were encountered: