SQLTeam.com | Weblogs | Forums

T-sql 2012 with uniqueidentifier issue


I copied some test data to an excel spreadsheet 2013 as a backup. Now I need to load the test backup data to sql server 2012. I want to use the import wizard to import this data. The problem is one of the columns is a uniqueidentifier that is set to not null. I am trying to load the data but I am having a problem. Thus can you tell me and/or point me to a reference that will tell me how to load the data and get past the error I am having?

  1. what is the error?
  2. have you tried an intermediate table?


How would I use an intermediate table? can you show me some sql examples?


Spreadsheets are declarative language for computations. SQL is a declarative language for data. They do not match up very well, but nobody wants to say that. The purpose of a GUID, UUID, etc. is to identify an object external to the database.

I have a horrible feeling that you misused a GUID as a fake pointer, but we have no code. This is a common design flaw among newbies.

I have been at this for a few decades (well, too many really :-)) and I think the best thing to do is to change your design when it is flawed. "No matter how far you have gone down the wrong road, turn around!" -- Turkish proverb