Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 609377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:33:37+00:00 2026-05-13T17:33:37+00:00

I have this table tblStore with these fields storeID (autonumber) storeName locationOrBranch and this

  • 0

I have this table

tblStore

with these fields

storeID (autonumber)  
storeName  
locationOrBranch

and this table

tblPurchased

with these fields

purchasedID  
storeID (foreign key)  
itemDesc

In the case of stores that have more than one location, there is a problem when two people inadvertently key the same store location differently. For example, take Harrisburg Chevron. On some of its receipts it calls itself Harrisburg Chevron, some just say Chevron at the top, and under that, Harrisburg. One person may key it into tblStore as storeName Chevron, locationoOrBranch Harrisburg. Person2 may key it as storeName Harrisburg Chevron, locationOrBranch Harrisburg. What makes this bad is that the business’s name is Harrisburg Chevron. It seems hard to make a rule (that would understandably cover all future opportunities for this error) to prevent people from doing this in the future.

Question 1) I’m thinking as the instances are found, an update query to change all records from one way to the other is the best way to fix it. Is this right?

Questions 2) What would be the best way to have originally set up the db to have avoided this?

Question 3) What can I do to make future after-the-fact corrections easier when this happens?

Thanks.

edit: I do understand that better business practices are the ideal prevention, but for question 2 I’m looking for any tips or tricks that people use that could help. And question 1 and 3 are important to me too.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T17:33:38+00:00Added an answer on May 13, 2026 at 5:33 pm

    This is not a database design issue.

    This is an issue with the processes around using the database design.

    The real question I have is why are users entering in stores ad-hoc? I can think of scenarios, but without knowing your situation it is hard to guess.

    The normal solution is that the tblStore table is a lookup table only. Normally users only have access to stores that have already been entered.

    Then there is a controlled process to maintain the tblStore table in a consistent manner. Only a few users would have access to this process.

    Of course as I alluded to above this is not always possible, so you may need a different solution.

    UPDATE:

    Question #1: An update script is the best approach. The best way to do this is to have a copy of the database if possible, or a close copy if not, and test the script against this data. Once you have ensured that the script runs correctly, then you can run it against the real data.

    If you have transactional integrity you should use that. Use “begin” before running the script and if the number of records is what you expect, and any other tests you devise (perhaps also scripted), then you can “commit”

    Do not type in SQL against a live DB.

    Question #3: I suggest your first line of attack is to create processes around the creation of new stores, but this may not be wiuthin your ambit.

    The second is possibly to get proactive and identify and enter new stores (if this is the problem) before the users in the field need to do so. I don’t know if this works inside your scenario.

    Lastly if you had a script that merged “store1” into “store2” you can standardise on that as a way of reducing time and errors. You could even possibly build that into an admin only screen that automated merging stores.

    That is all I can think of off the top of my head.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this table: -id : primary key -code : CHAR(8) unique Is there
I have this table that has a lot of book related fields including keywords.
I have this table: create table demo ( key number(10) not null, type varchar2(3)
I have this table named sample with these values in MS Sql Server: ID
I have this table that is currently 1200+ rows, of which these rows have
I have this table in an Oracle DB which has a primary key defined
I have this table: <table class=mytbl> <thead> <tr> <th>dyn-tbl-hdr-1</th> <----these actually are timestamps. <th>dyn-tbl-hdr-2</th>
I have this table: sportman { code int primary key, date Date. } containing
I have this table Test as Id, SomeValue, SomeText contains about a mill records,
I have this table: UNIQUE_ID | WINNER_ID | FINALIST_ID ________1 | ________1 | __________2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.