RE: multiple values

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Alejandro Mesa (AlejandroMesa_at_discussions.microsoft.com)
Date: 08/16/04


Date: Mon, 16 Aug 2004 12:57:01 -0700

May be storing each option as an independent row in another table. You can
find more information reading about "Normalization".

Example:

create table customer (custID int nor null primary key, ...)
create table color(colorID int not null primary key, ...)
create table customer_color(custID int not null references
customer(customerID),
colrID int not null references color(colrID),
...
constraint pk_customer_color primary key (customerID, colorID))

AMB

"Ezekiël" wrote:

> Hi,
>
> Does anyone has a some good advice/example how to store multiple values for
> a field.
>
> For single choice fields, i use a combobox in access and the value will be
> an integer number, but how about when a field has multiple choices? Should i
> use a listbox with multiple select enabled for visual appearance.
> If i choose that option how should the value be stored? The sum of 2 or more
> choices. But then again i will get stuck for example if a user chooses 2
> choices with a value of 1 and 3. The sum of that is 4, but that could be the
> value of choice option 4.
>
> I'm running out of ideas, can anyone help me on this?
>
>
>



Relevant Pages

  • Re: BIG BUG in Deleting detali records
    ... in the database in order to enforce referential integrity. ... when the customer himself is deleted from the master table. ... customerID int identity not null primary key, ...
    (borland.public.delphi.database.ado)
  • Re: writing strings instead of rabish to file using fprintf
    ... > please and help me finding the reason why this rabish is being ... use either int or unsigned ... And similarly with customer number. ... FAQ below. ...
    (comp.lang.c)
  • Re: Database Design Problem
    ... at your design that you would lose ProductCategoryID from the Orders table ... You should also have a customer and employee table and only include ... [EmployeeID [INT] ... You would also have primarykeys on OrderID in ORders and SerialNumber in ...
    (microsoft.public.sqlserver.programming)
  • Re: need help with nested subquery
    ... I have a table called inbound within a database called Vehicles, ... inbound stores one month of data for each customer, each customer has one or more vehicles, a vehicle sends in up to eighty reports a day similar to the data I posted earlier, ... Custimerid (primary key) int ...
    (microsoft.public.sqlserver.programming)
  • Re: How to make a Foreing Key?
    ... Supose I have this tables DETAIL, HEADER and ITEMS and I want to add in the ... Should I ADD a field CUSTOMER in the table DETAIL to do that? ...
    (microsoft.public.sqlserver.programming)