?
Solved

Replace a part string with another part string in a field using a table as the criteria lookup

Posted on 2014-03-04
4
Medium Priority
?
699 Views
Last Modified: 2014-03-05
I have a main table which contains thousands of records - tblPrograms. As there are many staff continually adding records to the table I end up with all sorts of variations for part strings of titles in the ProgramTitle field.

For example, the part string of "OneChannel" is sometimes input as "One Channel", "One_Channel" or "One-Channel" which makes querying the data difficult.

So, to try and assist in cleansing the data for reporting, I have created a table (TitleAdjustments) which has 2 columns - "PartStringEntered" and "PartStringReplaced".  I want to add to this table as I find these types of inconsistences.

What I am hoping for is a function that basically finds the "PartStringEntered" in ProgramTitle field of tblPrograms table and only replaces that part of the title with "PartStringReplaced".

I do not want to permanently change the title in tblPrograms, only use this function in querying the data.

Is this possible?

Thanks in advance
darls15
0
Comment
Question by:darls15
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 7

Expert Comment

by:COACHMAN99
ID: 39905220
Why don't you have a program lookup table, and only store the program id in the main table?

If your query joins on the two part-strings and only shows the required one this will work (although joining large tables on strings isn't a good idea)
0
 

Author Comment

by:darls15
ID: 39905281
Hi COACHMAN99

The data is a direct export from a web-based system which is accessed by staff in many locations around the state. Program titles have been and continue to be entered inconsistently. One rule is that the titles must contain the "OneChannel" identifier (and others, this is just an example) for querying purposes once exported to my database. However these identifiers have been and continue to be entered in many variations and I have no control over this.

As a fresh export of the data is done monthly and I really need a method of "cleansing" these identifiers to produce updated reports.

"Support Staff" is another identifier and gets entered as "SupportStaff", "Support_Staff" and "Support-Staff".

Any other suggestions?

Thanks
darls15
0
 
LVL 7

Accepted Solution

by:
COACHMAN99 earned 1500 total points
ID: 39905388
other than a new list of all 'mis-spelled' choices in one column, and the preferred spelling in another as you have, probably not.
0
 

Author Closing Comment

by:darls15
ID: 39908006
Thanks for your assistance COACHMAN99. Solution wasn't quite what I was after but is one I will go with.
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question