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

Updating/inserting >> Linking table

A dilemma:

If I am attempting to add multiple products to an existing Customer-Products
linking table do I do this via an Insert or Update?

The first time I enter a customer in the database I would obviously do an
INSERT into the Customer-products linking table.

But, the second time I wish to ADD new products as well as possibly
overwrite existing ones......

I am getting twisted what the correct approach is?

- Jason
Jul 19 '05 #1
1 1438
?

Are you adding products, or are you adding transactions (in the sense of
buying an item with money, not a bank transaction or database transaction)?
Where do you store this? What's your database design like?
Customers
--CustomerID

Products
--ProductID

Purchases
--DateOfPurchase
--CustomerID
--ProductID

?

UPDATE updates an existing record, and INSERT adds a new record.

Ray at work

"jason" <ja***@catamaranco.com> wrote in message
news:OE**************@TK2MSFTNGP12.phx.gbl...
A dilemma:

If I am attempting to add multiple products to an existing Customer-Products linking table do I do this via an Insert or Update?

The first time I enter a customer in the database I would obviously do an
INSERT into the Customer-products linking table.

But, the second time I wish to ADD new products as well as possibly
overwrite existing ones......

I am getting twisted what the correct approach is?

- Jason

Jul 19 '05 #2

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

Similar topics

7
by: Dimitri Furman | last post by:
What would be the correct syntax, if any, that allows updating a table variable in a statement that uses the same table variable in a correlated subquery? Here's an example: DECLARE @t table (N1...
3
by: Steve Housechild | last post by:
I have a table of 'Customers', a table of 'Newsletters' and a table for storing which customers have recieved which letters 'CustLett'. By using a query, I have pulled a list of customers who...
8
by: Zest4Csharp | last post by:
hi, I have a database table without a key field. I managed to view the contents of the table through a DataSet in a DataGrid in C#. The user can edit the data in the grid. Can someone show me how...
5
by: aaron.m.johnson | last post by:
I have an application which contains an Access database with linked tables that point to another database within the application. The problem I have is that when the user installs the application,...
2
by: ConfusedMay | last post by:
Hi, Could someone help me with updating my table? I'm using access 97. I have a table that have # of tests and test reasons called testing. what I need is if there's any job with test reason...
4
by: AlexNunley | last post by:
I've adopted a moderately sized (65k records) active use database (Access 2000, Windows XP). One of the most commonly used forms is whats called the RMA generation field, used to add claim...
4
by: Light1 | last post by:
I am working in Access 2003. I have a form that pulls information from a couple of tables. When the user chooses a selection from the dropdown menu of a combo box, it is putting that information...
10
by: jmartmem | last post by:
Greetings, I have an ASP page with a 5x5 table embedded inside an Insert Record Form. This table contains several fields (mostly drop down list menus) and is used for corporate timekeeping (users...
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.