#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    18
    Rep Power
    0

    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.

    Any ideas?
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Binghamton, NY
    Posts
    22
    Rep Power
    0
    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)
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    18
    Rep Power
    0
    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.

IMN logo majestic logo threadwatch logo seochat tools logo