Hot answers tagged

7

What you describe is not a one-to-many relationship but a many-to-many relationship because the column Field1 is not unique in any of the two tables (and please pick better names to describe the columns and tables, "Table1", "Table2", "Field1" say nothing about the table or the column and are very confusing). I see two options depending on what your ...


5

The strongest advice I can give is to keep the primary key immutable unless it is absolutely unfeasible for your use-case. You appear to be describing 2 different datasets. User-Actions taken during a given Period ( defined by the composite key of Year-Week ) User-Actions taken during an unknown Period My initial impression is that the unknown period ...


4

What you appear to have is two tables that refer to a common field They have an inferred relationship In the case of a common field then create a master table for Field1 that is nothing but the valid values for Field1. Table1 and Table2 will each have references to the table Field1. If you really need a direct relationship from Table1 to Table2 ...


1

As I stated in a comment above, you'll want to re-enable a primary key. If you already have a filled table, you may have to migrate it to a new table, as - from what I recall - Access doesn't like creating autonumber fields in existing tables that don't currently have them. So, create a new Query, ignore the design view and click over to SQL view (close ...


1

You can use a default date of something way out of bounds. e.g. in the table definition YEAR INTEGER DEFAULT 1776, WEEK INTEGER DEFAULT 99 That way you know that everything gets entered with some date. It will continue to not allow you to enter in duplicate data. In addition, you can create an exception report based off these values kicked off to someone ...


1

It looks like that at the time I'm writing this there is no way to pass Windows security credentials when using a SQL Server user. The SQL Server user will always use the credentials of the Windows account the service is running with. In most cases it's not even an actual user as it's just a service account that can't be bound to a domain controller to ...



Only top voted, non community-wiki answers of a minimum length are eligible