If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Combinning two table fields to one?
Trucks deliver merchandise to our warehouse. We need to track the date and
the boxes that were delivered by this truck. The same truck makes several deliveries so it's ID# cannot be used as a unique number. The truck ID and the date combined, however, can be used as a unique number. Is there a way to combine the Truck ID# and date to make a unique key field for the Delivery table? I can combine these values for forms, queries and reports. If this can't be done, what suggestions do you have for creating a unique number or should I just set the key field to autonumber? |
#2
|
|||
|
|||
Combinning two table fields to one?
SharonInGa wrote:
Trucks deliver merchandise to our warehouse. We need to track the date and the boxes that were delivered by this truck. The same truck makes several deliveries so it's ID# cannot be used as a unique number. The truck ID and the date combined, however, can be used as a unique number. Is there a way to combine the Truck ID# and date to make a unique key field for the Delivery table? I can combine these values for forms, queries and reports. If this can't be done, what suggestions do you have for creating a unique number or should I just set the key field to autonumber? A primary key (or index) can contain as many as 10 fields. No need to combine them into a single field. -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com |
#3
|
|||
|
|||
Combinning two table fields to one?
Yes BUT what if, one day, the same truck makes two deliveries? That may not
be a possibility now, but what if practices change and it happens some time in the future? Creating a separate, unique number would preclude such problems. "Rick Brandt" wrote in message om... SharonInGa wrote: Trucks deliver merchandise to our warehouse. We need to track the date and the boxes that were delivered by this truck. The same truck makes several deliveries so it's ID# cannot be used as a unique number. The truck ID and the date combined, however, can be used as a unique number. Is there a way to combine the Truck ID# and date to make a unique key field for the Delivery table? I can combine these values for forms, queries and reports. If this can't be done, what suggestions do you have for creating a unique number or should I just set the key field to autonumber? A primary key (or index) can contain as many as 10 fields. No need to combine them into a single field. -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com |
#4
|
|||
|
|||
Combinning two table fields to one?
Bruce Rusk wrote:
Yes BUT what if, one day, the same truck makes two deliveries? That may not be a possibility now, but what if practices change and it happens some time in the future? Creating a separate, unique number would preclude such problems. What I said was that you build one primary key that consists of both the truck ID field and the delivery time field. There is no requirement that the key consist of only one field. -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com |
#5
|
|||
|
|||
Combinning two table fields to one?
27-2005-1111-01
27-2005-1111-02 Truck number 27 Date 2005-11-11 delivery # 1 delivery # 2 and so on......... And call it truckdeliveryid or something like that "Rick Brandt" wrote: Bruce Rusk wrote: Yes BUT what if, one day, the same truck makes two deliveries? That may not be a possibility now, but what if practices change and it happens some time in the future? Creating a separate, unique number would preclude such problems. What I said was that you build one primary key that consists of both the truck ID field and the delivery time field. There is no requirement that the key consist of only one field. -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table design problem? | Melissa | Database Design | 29 | November 18th, 2005 04:14 AM |
Design help, please | SillySally | Using Forms | 27 | March 6th, 2005 04:11 AM |
Here's a shocker | Mike Labosh | General Discussion | 2 | October 26th, 2004 05:04 PM |
Complicated Databse w/many relationships | Søren | Database Design | 7 | July 13th, 2004 05:41 AM |
COMPARE THE TWO TABLES | Stefanie | General Discussion | 0 | June 4th, 2004 04:36 PM |