craving94509
Technical User
Hello all,
New to the forum and hope someone can help me with an issue that has been driving me crazy.
Our company has acquired many different gas processing facilities that all run the same program (Maximo) in stand alone environments on Oracle. Each of these plants has exported there data to Access for me to load into a single Maximo SQL Server instance.
Each Access table has a primary key named "tablenameID", for this example we will use WORKORDERID. What this means is I have 7 different database exports each with a work order table, each with there own primary key sequence. Since I am tasked with moving these into a single database I need to renumber each export based on the max(workorderid) that is currently in the single instance of SQL Server. These primary key fields are text fields in Access.
What I am looking for is a query I can run that will prompt me for the starting number and sequentially number each record in the table.
Something similar to this:
Update workorder set workorderid = (prompt for number)
Then if I enter 150,000 each record should be sequentially numbered 150000, 150001, 150002
I have tried many different ways to work around this, but since many of these tables have 500K records, I thought a query would really make short work of this pestering issue.
If anyone has an idea on how to build this query I would surely appreciate it.
New to the forum and hope someone can help me with an issue that has been driving me crazy.
Our company has acquired many different gas processing facilities that all run the same program (Maximo) in stand alone environments on Oracle. Each of these plants has exported there data to Access for me to load into a single Maximo SQL Server instance.
Each Access table has a primary key named "tablenameID", for this example we will use WORKORDERID. What this means is I have 7 different database exports each with a work order table, each with there own primary key sequence. Since I am tasked with moving these into a single database I need to renumber each export based on the max(workorderid) that is currently in the single instance of SQL Server. These primary key fields are text fields in Access.
What I am looking for is a query I can run that will prompt me for the starting number and sequentially number each record in the table.
Something similar to this:
Update workorder set workorderid = (prompt for number)
Then if I enter 150,000 each record should be sequentially numbered 150000, 150001, 150002
I have tried many different ways to work around this, but since many of these tables have 500K records, I thought a query would really make short work of this pestering issue.
If anyone has an idea on how to build this query I would surely appreciate it.