Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Access database to SQL

Access database to SQL

Scheduled Pinned Locked Moved Database
databasetutorialquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KORCARI
    wrote on last edited by
    #1

    Hi All. I have some small Access databases including identical tables. For example let's suppose I got a.mdb b.mdb c.mdb with table1 table2 table3. Is this possible to merge data from table1 table2 table3 in a SQL database without creating problems with ID colums of each table (0;1;2;3;4......) How this task can be realized? Thank you in advance

    P B L 3 Replies Last reply
    0
    • K KORCARI

      Hi All. I have some small Access databases including identical tables. For example let's suppose I got a.mdb b.mdb c.mdb with table1 table2 table3. Is this possible to merge data from table1 table2 table3 in a SQL database without creating problems with ID colums of each table (0;1;2;3;4......) How this task can be realized? Thank you in advance

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      KORCARI wrote:

      without creating problems with ID colums

      What are you using for a datatype? If UniqueIdentifier, you should be OK; if auto-increment integers, you're hosed.

      1 Reply Last reply
      0
      • K KORCARI

        Hi All. I have some small Access databases including identical tables. For example let's suppose I got a.mdb b.mdb c.mdb with table1 table2 table3. Is this possible to merge data from table1 table2 table3 in a SQL database without creating problems with ID colums of each table (0;1;2;3;4......) How this task can be realized? Thank you in advance

        B Offline
        B Offline
        Bernhard Hiller
        wrote on last edited by
        #3

        It's a terrible task. In your small Access dbs, turn off the autoincrement feature of the ID columns. Then look for the max ID values in the first db, update the IDs in the second by adding that value, then take the new max value, .... In SQL Server, use "SET IDENTITY_INSERT " + table + " ON". Now move your Access data to SQL Server, turn IDENTITY_INSERT off again, and throw away the small Access dbs.

        1 Reply Last reply
        0
        • K KORCARI

          Hi All. I have some small Access databases including identical tables. For example let's suppose I got a.mdb b.mdb c.mdb with table1 table2 table3. Is this possible to merge data from table1 table2 table3 in a SQL database without creating problems with ID colums of each table (0;1;2;3;4......) How this task can be realized? Thank you in advance

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          KORCARI wrote:

          Is this possible to merge data from table1 table2 table3 in a SQL database without creating problems with ID colums of each table

          Yes. Add a column called "sourceDatabaseName", make it part of the primary key, and when importing write the name of the database that you're importing into that column. If you're moving a lot of data, then this would be the time to consider upgrading to Sql Server (express) :)

          I are Troll :suss:

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups