HyperSQL SqlTool: Header has X columns, but input record has Y column values

I received the following error when attempting to import data into HyperSQL via the bundled SqlTool from a CSV file generated by MSSQL Server.

Header has 17 columns, but input record has 14 column values

Normally this indicates just what it says, that the header of the DSV specifies a different number of columns from the number indicated in the value line. In my case however I did have the correct number of columns.

The column that was giving the problem contained JavaScript. I thought the semi-colons or parenthesis may be the cause but they had no effect. The error was caused by newline characters in the JavaScript. After removing these the import worked.

Example of data causing the error:

0|Some text|var count = 5;
1|Some more text| if(util.isSomething()) {
    result = 'Something';
} else {
    result = 'Nothing';
2|Even more text|var count = 4;
This entry was posted in Programming and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *