Column in INSERT query needs to increment if matching data on rows is different I tried to simplify what I am trying to do.  This is for work, we sell metal.  When an order is placed material, coating, masking, etc. is chosen.  Then someone allocates material for the order.  They want to create 2 programs.  One where a user will enter in an order number, it will verify it is a correct order  number.  It will then look at 4 tables with existing data.  It needs to take certain specs requested from those 4 tables and put them in 4 other tables that are currently empty.  Bottom line is they want to find out what was allocated for the order.  If that particular combination has already been requested on a different order number they just want to add a 1 to times_used column.  End result would be a different program that looks through these new tables.  They want to be able to determine what needs to be allocated for an order by looking at what was previously allocated on other orders. Is there any way this can be one program and not two?  The information is already in the tables I don' know why I couldn't just do this with 1 program.
This is where views come in handy, and an understanding of relational databases. You can store each entry in a table dedicated for that. Each entry can have its own PK value that lets you differentiate between it. However, each entry can refer to a separate table to identify the Customer, Order, LineSeq. If you need to insert an entry for a Cus+Ord+LS that doesn’t exist yet, you create a new one, with its own PK value. Then you create a view which joins those two tables, including a COUNT_BIG(*) aggregate to count how many times they’re used. You could even index the view so that the values are worked out ahead of time.

To use this the way you want, you could put an “instead of trigger” on your view that handles the inserts/deletes into your entries table. That’s essentially a procedure that you interact with by doing inserts into a view, even though your view can’t handle inserts.