0

I'm trying to import a table from a database to another but keep getting this error

the command:

INSERT IGNORE INTO epdbraid.spawnpoints ( 
    id, spawn_id, lat, lon, despawn_time, updated 
) 
SELECT 
    0, 
    CAST(CONV(id,16,10) AS INTEGER), 
    latitude, longitude, latest_seen, last_scanned 
FROM rocketmapdb.spawnpoint;

The error:

ERROR 1064 (42000): 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 'INTEGER), latitude, longitude, latest_seen, last_scanned FROM rocketmapdb.spawnp' at line 1

sql version: mysql Ver 14.14 Distrib 5.7.18, for Linux (x86_64) using EditLine wrapper

Any idea what I'm doing wrong?

0

1 Answer 1

1
INSERT IGNORE INTO epdbraid.spawnpoints ( 
    id, spawn_id, lat, lon, despawn_time, updated 
) 
SELECT 
    0, 
    CAST(CONV(id,16,10) AS  UNSIGNED ), 
    latitude, longitude, latest_seen, last_scanned 
FROM rocketmapdb.spawnpoint;

You can try above code.

Sign up to request clarification or add additional context in comments.

1 Comment

this worked thank you very much!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.