Forums » General Discussion

Thread: Import from excel and generate auto_increment primary key

This question is not answered. Helpful answers available: 2. Answered answers available: 1.


Permlink Replies: 0 - Pages: 1 Threads: [ Previous | Next ]
dijxtra

Posts: 1
Registered: 9/20/12
Import from excel and generate auto_increment primary key
Posted: Sep 20, 2012 5:03 AM
 
  Click to reply to this thread Reply

So, I'm importing an Excel table through the Import Wizard. There is no primary key in the Excel table, so I added auto_increment INT as a primary key to the SQL table. But, there is no column in the Excel table to map the primary key to. If I just leave "skip this field", then import wizard fills the primary key field with null values, which throws an exception.

Is there a way to tell the import wizard to fill the skipped fields with zeros instead of nulls, so that auto_increment mechanism autogenerates the primary key?

Thanks in advance,
dijxtra



Legend
Guru: 2001 + pts
Expert: 751 - 2000 pts
Enthusiast: 31 - 750 pts
Novice: 0 - 30 pts
Moderators
Helpful answer (5 pts)
Answered (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums