473,322 Members | 1,232 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,322 software developers and data experts.

Relationship between maintable and subtable

mseo
181 100+
hi
I have two tables and I have not assigned any PK or FK yet because I need any suggestion
tbl_salesreturns

ReturnreceiptNo
Customer_ID
Date

tbl_salesReturnsdetail

ReturnreceiptNo
Product_ID
Quantity
UnitPrice

I need to make the relationship to be like:
suppose that I have 2 customers and they returned products, the first customer has return receipt No 1052, and after a period of time the second customer returned products with receipt No 1052

in tbl_sales returns: More than one customer may has the same ReturnReceiptNo (the number of the receipt), that means that the ReturnReceiptNo could be entered into the table for each customer, so the ReturnReceiptNo couldn't be as PK.
in tbl_sales Returns detail: each ReturnReceiptNo has more than one product, but I want to prevent the duplication in the products within the same receipt.
I appreciate your help
Jun 5 '10 #1
0 1118

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Alcyone Oliveira | last post by:
------=_NextPart_000_000D_01C36572.F6480CE0 Content-Type: multipart/alternative; boundary="----=_NextPart_001_000E_01C36572.F6480CE0" ------=_NextPart_001_000E_01C36572.F6480CE0 Content-Type:...
0
by: Mike Sutton | last post by:
Please let me know what you think of this scheme I have come up with (not to imply that noone else has before me) for managing relationships. I have created an entities table with Individual and...
8
by: Andante.in.Blue | last post by:
Hello, I have just inherited a legacy Access 97 database. While going through it, I noticed something strange... its Relationships window (the one accessed by Tools --> Relationships) is almost...
2
by: Larry R Harrison Jr | last post by:
I have an Access 97 database with 2 tables that have a one-many relationship. I have a SQL statement in the "one" table which I want to execute and insert 7 records into the "many" table, and I...
5
by: BrianDP | last post by:
This is a strange one-- I have an Access 2K database with a split front end/back end. There are two tables in the back end - RFile and RLine. There is a one to many relationship from...
1
by: BuckBaxter | last post by:
Recently had trouble creating a one-to-many relationship between Customer table and Order table. After drag & dropping the field CustomerNo (key) in Customer table to CustomerNo (foreign) in Order...
4
by: Phil Stanton | last post by:
Having spent ages sorting out the layout of my relationship window with about 60 tables and getting it all tidy and with enough of the tables visible to show the PK an FK relaionshipsOn a subseqent...
3
by: Jollywg | last post by:
I have a table (tblOne) it has 2 columns and about 25 rows under column1. Basically I have Cars as the Column header and 25 different types of cars for rows, and Qty for the column header2. ...
6
by: kstevens | last post by:
I have tables setup with a main table for information and a subtable that records the "multiple" records for the main record. I have written a query to go in and find Null or "" values to delete...
6
by: NicoleCartrette | last post by:
Going back to school is easier said than done.. This was posted to an older thread earlier but I don't think it got any attention. Your help is appreciated Professor requires we create a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.