Storing unchanged data ONLY ONCE in a table

valley

Registered User.
Local time
Today, 22:24
Joined
Nov 17, 2006
Messages
34
Hello,

I have a COMBO box which currently finds the last record
from a table of Records with RecorNum as the primary key based on a Cust_ID with following as source

SELECT Cust_ID, Max(RecordNum) AS MaxRec FROM Miracle_Cloth_Main GROUP BY Cust_ID ORDER BY Cust_ID;

This works very well.

When a new record is created I currently Copy
unchanged INfo like address from current record to New record which also work fine.

This however creates repeated entries in the table.
(Of course I was warned this is not the way for RDBMS )
Code:
Cust_ID	RecordNum	Address	City	Postcode
FOURTH Customer	25	xxxxxxxxxx	ggggggggggg	yyyyyyyyyyy
FOURTH Customer	26	xxxxxxxxxx	ggggggggggg	yyyyyyyyyyy
FOURTH Customer	27	xxxxxxxxxx	ggggggggggg	yyyyyyyyyyy
FOURTH Customer	28	xxxxxxxxxx	ggggggggggg	yyyyyyyyyyy
FOURTH Customer	29	xxxxxxxxxx	yyyyyyyyyyy	yyyyyyyyyyy
FOURTH Customer	30	xxxxxxxxxx	yyyyyyyyyyy	yyyyyyyyyyy
FOURTH Customer	31	xxxxxxxxxx	nnnnnnnn	yyyyyyyyyyy
Small customer	32	ggggggggggg		ggggggggggg
Small customer	33	ggggggggggg	ggggggggggg	ggggggggggg
Small customer	34	ggggggggggg	ggggggggggg	ggggggggggg
Anycustomerother customer	35	ggggggggggg	ggggggggggg	ggggggggggg
Anycustomer	36	yyyyyyyyyyy	ggggggggggg	yyyyyyyyyyy
AnyCustomer	37	yyyyyyyyyyy	yyyyyyyyyyy	yyyyyyyyyyy
Is there a way to store these only for the very first record for a Cust_ID in the table so that the table could load faster?
 

Users who are viewing this thread

Back
Top Bottom