In my csv files that I want to bulk insert into SQL Server, there's text (serial number) that's not in the .csv column format that I would LOVE to use as a primary key.
EX. Data from Engine SQL03423, version 21.04, time, speed, temp june 3 1:00, 90, 200 june 3 1:01, 69, 392
The SQL03423 I want to use as a primary key in my database.
However I get reports from this particular engine daily and if I get to use it as a primary key I'm sure I'll run into the issue of using the same primary key the next time I insert new data which will give me an error.
How do I get around this? I need the serial number regardless even if it's not the primary key. Also if I can't use it as a primary key, how do I create a "dummy" primary key into the target table that will autoincrement even if that particular column is obviously not in the csv files I'm importing? Is this even possible?
I am aware of stored procedures, views, etc in SQL. I have basic knowledge if that helps.