EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Database/World Building (https://www.eqemulator.org/forums/forumdisplay.php?f=596)
-   -   HeidiSQL export and import csv issue (https://www.eqemulator.org/forums/showthread.php?t=42333)

calasoren 02-17-2019 06:50 PM

HeidiSQL export and import csv issue
 
Hi Everyone,

I am hoping someone can assist with this, I am trying to export the merchantlist to a file *currently I have been attempting an Export grid rows with delimited text* Example of first 2 lines below

merchantid;slot;item;faction_required;level_requir ed;alt_currency_cost;classes_required;probability
27;1;50011;-100;0;0;65535;100

After this I add my addition lines with the same format and attempt to do an import CSV file back to the table with a replace (duplicates). I have attempted many adjustments to the settings between the export and import with no luck. Below is an error that I am seeing.

LOAD DATA LOW_PRIORITY LOCAL INFILE 'C:\\Users\\Andrew\\Desktop\\Merchantlistlatest.cs v' REPLACE INTO TABLE `peq`.`merchantlist` FIELDS TERMINATED BY ' ;' ESCAPED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 LINES (`merchantid`, `slot`, `item`, `faction_required`, `level_required`, `alt_currency_cost`, `classes_required`, `probability`);
/* SQL Error (1265): Data truncated for column 'merchantid' at row 1 */


I apologize for the question but I am very new to trying to read the error being produced and cant seem to come up with the possible issue. Is anyone able to recognize the issue or do you have a better method of me adding larger amounts of database table entries quickly?

Thanks so much for your assistance

superpally1 02-17-2019 11:46 PM

Maybe heidi is having issues with the .csv format.
I always export with the .sql extension without issue.
One of these links can help convert your file.

http://convertcsv.com/csv-to-sql.htm


or

https://sqlizer.io/#/

Uleat 02-18-2019 12:37 AM

I see semi-colons..are you importing with the correct delimiter?

calasoren 02-18-2019 03:46 AM

Thanks Guys, Yes I had tried adjusting delimiters but was not having any luck.

Super Pally I think I can make that do the trick, I have a little learning to do with the csv to sql converter tool but atleast in a new table it looks like I can process the whole thing with no issues from what I can tell. If I can figure out how to merge instead of creating a whole new table which I am sure I can that should do even speed me up more.

Thanks again this will be a huge help :)


All times are GMT -4. The time now is 02:19 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.