I need to load a csv text file into my table. The file does not have a value field for every field of the table.
For discussion lets say the table has 12 fields. The first field is userid - a primary key that is set up to autoincrement. Fields 2-12 are various things like Name, address, etc.
The csv file starts with field 2 of my table definition. That being First name. It then matches up with fields 3-6. Field 6 is the last field in the data file.
So what I want to do is to import the file into my table populating fields 2-6. In addition I would like the primary key to assign a user_id number as the rows are added. I want to leave fields 7-12 blank, to be updated later when other data is available.
I was able to use the load data file process to get fields 2-6 imported, but it left the user_id blank.
I have tried to look at the syntax to figure this out but I don't see how to get it to also assign the userid number as it imports the data.
Can anyone help me out?