Re: Inconsistent data within a column
Posted in 1998
Richard Crawford wrote: > > Is there a quick and easy way to make data within a column consistent? > > For example, a company name could be represented 10 different ways in > the column name field, so if I run a query looking for all customers > from 'Hewlett-Packard', I miss the ones from 'HP' , 'Hewlett Packard', > 'H.P.', and of course any misspellings. It would take me for ever to > manually make this consistent. Going forward this is easy. Just do not store the name, only store a name id and create a company-name table which maintains the ID. Adding a new ID in a separate task could check for obvious mispellings to prevent duplicate entries. If a dup were discovered later only one record would have to be deleted with all rows in other tables containing the invalidated ID updated to the correct one. Use referential integrity constraints to force the use of valid IDs. Ain't normalization wonderful? Art S. Kagel