January 26th, 2004, 11:07 AM
Importing data from access -> SQL2k
Does anybody know if there is a way to import just the data from Access to SQL2k without having it recreate the table structure?
The problem I run into is I have a working table structure all ready setup and just want to import the data. Using the DTS or the upsizing wizard seems to create the table structure over again and forces the varchar tables to become nvarchar. It's a pain having to go through 20 tables and changing every instance of nvarchar back to varchar.
January 26th, 2004, 02:58 PM
This doesn't really answer your question but, you don't have to change the datatypes one at a time on each table. You can run a script like this:
alter table mytab alter column fld1 varchar(20)
alter table mytab2 alter column fld1 varchar(20)
alter table mytab20 alter column fld1 varchar(20)
January 26th, 2004, 03:01 PM
Thanks. I wouldn't mind doing it before I import using the DTS (...) but if the nvarchar is less then (50) in size, it changes it to that. I.E if I have a nvarchar(5) it changes it to varchar(50) once I turn the type to varchar.