Forum Discussion
Updating a Azure SQL Linked Table From Local Tables
Right. In SQL Server, it's possible to designate the int Datatype as the PK without having it autogenerate the values. That's controlled by the Identity property. In Access, as we know, the AutoNumber is the functional equivalent, but to create a non-autonumber PK, we have to change to the Long Integer datatype.
If the value in a field can't be unique, then, no it's not a candidate to be a Primary Key, although it can still be designated as the Foreign Key to another, related table and it can be indexed.
- StildawnApr 14, 2021Copper ContributorSo how do I get around non-unique and the runtime error issue?
- George_HepworthApr 14, 2021Silver Contributor
We sort of moved onto a different aspect here. Why would the non-unique values come into play at this point? Where are they coming from? I'm pressed for time, and I think I need to re-study the entire discussion to see where I lost the plot. Later today.
- StildawnApr 15, 2021Copper ContributorThe original Master_Data2 is a query, it's actually the result of 3 queries, that combines lots of data from the tables together.
If required (due to valid dates of data) the queries will make two rows with the same ID (from the FRT_Table) but with different data in the other columns.
But since this set of queries only need to be run when the admin does an update, I'm trying to eliminate every user running it locally by storing the result in a Master_Data2_Temp table, and transferring this to Azure SQL so that all users share the same one.
So yeah often the ID column will have duplicates.