Access database to SQL
-
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
-
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
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.
-
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
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. -
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
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: