New answers tagged

0

To quote MSDN as an authoritative source: There are no significant differences between creating a UNIQUE constraint and creating a unique index that is independent of a constraint. Data validation occurs in the same manner, and the query optimizer does not differentiate between a unique index created by a constraint or manually created. However, creating ...


0

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 ...


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 ...


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 ...


0

You could do a lot of stuff but integer and text do not sort the same. Text would break a search on week > 6. In text 10, 11, 12 are not > 6. I would use 0 for no date Not that size is the big of a deal but you would use tinyint for week and smallint for year one varchar is the size of a smallint



Top 50 recent answers are included