473,396 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How do you record multiple values into a column??

E.G. I want to record sales.
Three tables - TblProduct TblCust & TblSales

TblCust fields = custID custName
TblProducts fields = prodID prodName
TblSales fields = salesID custID prodID

If Bob (cust ID 555) buys prodID 4 and prodID 5, how can I record this
in TblSales? Can I record both item 4 and 5 in a single field?

EG
salesID = 100
custID = 555
prodID = 4 & 5

or would I need:
salesID = 100
custID = 555
prodID1 = 0
prodID2 = 0
prodID3 = 0
prodID4 = 1
prodID5 = 1

What's the normal way to do this?

Thanks!
Cam

Jan 1 '06 #1
2 1481
gr*****@gmail.com wrote:
E.G. I want to record sales.
Three tables - TblProduct TblCust & TblSales

TblCust fields = custID custName
TblProducts fields = prodID prodName
TblSales fields = salesID custID prodID

If Bob (cust ID 555) buys prodID 4 and prodID 5, how can I record this
in TblSales? Can I record both item 4 and 5 in a single field?

EG
salesID = 100
custID = 555
prodID = 4 & 5

or would I need:
salesID = 100
custID = 555
prodID1 = 0
prodID2 = 0
prodID3 = 0
prodID4 = 1
prodID5 = 1

What's the normal way to do this?


The normal way is to have an additional table for the items on each sale.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Jan 1 '06 #2
you need
tblSales
salesId
custId

tblSalesDetail
salesId
prodId

to allow for many products for one sales order

gr*****@gmail.com wrote:
E.G. I want to record sales.
Three tables - TblProduct TblCust & TblSales

TblCust fields = custID custName
TblProducts fields = prodID prodName
TblSales fields = salesID custID prodID

If Bob (cust ID 555) buys prodID 4 and prodID 5, how can I record this
in TblSales? Can I record both item 4 and 5 in a single field?

EG
salesID = 100
custID = 555
prodID = 4 & 5

or would I need:
salesID = 100
custID = 555
prodID1 = 0
prodID2 = 0
prodID3 = 0
prodID4 = 1
prodID5 = 1

What's the normal way to do this?

Thanks!
Cam


Jan 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Justin | last post by:
Hi, In the process of localizing the 'regions' table, we added three new tables. The localized data will be stored in the TokenKeys and TokenValues tables. It would be easier if we did away with...
5
by: Sami | last post by:
Please bear with me, and if you answer this question, please do it step by step. I am new at Access, not at all sophisticated. I am using Office XP. This will need to be read in Access for...
5
by: Bob | last post by:
Hi Everybody I have a form called frmListBox that is connected to a table tblListBox. This is opened from a form called "frmInvoiceOrder" which has a subform called "zfrmInvoiceOrder" and...
6
by: Mike Conklin | last post by:
This one really has me going. Probably something silly. I'm using dcount for a report to determine the number of different types of tests proctored in a semester. My report is based on a...
5
by: D. Shane Fowlkes | last post by:
This may be a very basic question but it's something I've never done before. I've looked at a couple of my favorite sites and books and can't find an answer either. I can write a Function to...
2
by: alee | last post by:
I am writing a stored procedure to handle Order and OrderDetail tables. I created a tempTable physically on the database, and insert the OrderDetails into the tempTable first, then I try to use the...
4
by: CK | last post by:
Good Morning, I have a person table with personID. I have a personRate table with personID, rateID, and effectiveDate. I need to select fields from personRate, but I want the fields from the...
6
by: polocar | last post by:
Hi, I'm writing a program in Visual C# 2005 Professional Edition. This program connects to a SQL Server 2005 database called "Generations" (in which there is only one table, called...
10
by: sara | last post by:
Hi - I have been struggling with solution ideas for this now for almost 2 weeks, and have not been able to figure this out. I have a user who creates a Purchase Order (tblPOData). In some...
4
by: Chris | last post by:
Hi, I have imported a spreadsheet into an access databsae and have noticed that there are multiple occurances of exactly the same record. I would like to know if there is a way of deleting the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.