Will import first column, but not the rest
When I first started using this program today, HeidiSQL only imported the first column and gave several errors that the value of the first column wasn't long enough. It did order the data in the correct rows. Now it only created three rows and added random data into two of the three columns. What am I doing wrong?
When you first started using this program today, what exactly did you DO ? Did you try to import a .csv file into an existing table, or what ? and if so, what are the characters that separate fields in the csv file ? how many fields have the liens in the .csv file, how many fields has the table ?
when you export .csv files from excel (or etc) by using "save as" with file type csv, the cell values are stored as adjacent fields in the resulting text file, one row per line. To separate these fields, excel usually uses a semicolon. cf rfc4180 for details; note that special care is necessary if any of the cell values should contain a double quote (") or semicolon character.
when using the "import csv file..." tool from heidiĀ“s menu, the following dialog has a panel named "control characters" in the upper right. Specify here the characters actually used in your file; with excel, its usually
"fields term by" = ;
"fields encl by" = "
"fields esc by" = \
"lines term by" = \r\n
if the file should contain as first line a header line with field (=column) names, also set "ignore first" to 1 on the upper left.
does this work ? if not, please post the first two lines from your airport file.
when using the "import csv file..." tool from heidiĀ“s menu, the following dialog has a panel named "control characters" in the upper right. Specify here the characters actually used in your file; with excel, its usually
"fields term by" = ;
"fields encl by" = "
"fields esc by" = \
"lines term by" = \r\n
if the file should contain as first line a header line with field (=column) names, also set "ignore first" to 1 on the upper left.
does this work ? if not, please post the first two lines from your airport file.
PS2: if the order of the fields in the database table (shown in the bottom right panel "Destination") should be different from the order of the fields in your .csv file, you must also first reorder the fields in this panel, using drag&drop, so that the resulting order of fields parallels that in the file.
ID ICAO FAAorIATA
101 KACK ACK
585 KAPF APF
This is a small example of the spreadsheet.
ID, ICAO, FAAorIATA
101,KACK, ACK
585,KAPF, APF
This is how heidisql sees it
What character's do I need and where should they be placed for heidisql to read this correctly?
101 KACK ACK
585 KAPF APF
This is a small example of the spreadsheet.
ID, ICAO, FAAorIATA
101,KACK, ACK
585,KAPF, APF
This is how heidisql sees it
What character's do I need and where should they be placed for heidisql to read this correctly?
Please login to leave a reply, or register at first.