0

CSV table with unequal columns per row Is there an option to import a csv with unequal columns per row?

What I would like to have is to fit "Classnr_Class_ptsclass_ptsratioclass_meandistDensity" into a separate table linked with the classnr (Primary & Foreign Key) to the rest of the data.

An SQL Db with 2 tables. One main table and a subtable. I would like to import the csv with different amount of ";" delimiter splits. Since it is not clear how many splits there are, I am struggling with the import and naming. I am working with HeidiSQL.

Zurch
  • 1
  • 1
  • 1
    I have to say that all your rows have 6 columns, not less, not more. If you want to further split the `Classnr_Class_ptsclass_ptsratioclass_meandistDensity` field into different columns then you should provide the expected result. BTW, an image of a spreadsheet representation of a CSV doesn't help the answerers; edit your question and post the real content (a CSV is a text file, open it with Notepad or whatever copy/pasting what's inside) – Fravadona Jan 16 '23 at 10:52
  • If you have a hammer, everything is a nail.. I would in your place do the efford and learn any scripting language which can format text and split strings. AWK, AutoIT3, Python, C#, bash or even PowerShell - instead of trying to format the data using pure SQL engine functions. – MyICQ Jan 16 '23 at 11:28

0 Answers0