I have 2 tables and need to create a query that pulls the names that match from each name field. The problem is when i created a join of course it works when the whole name matches but need it to pull when only the first and second name matches. See example.
You would need to join based on the first part of each field. For example:
Expand|Select|Wrap|Line Numbers
Left([FieldName], 11)
But, this can cause problems, because you don't know for sure how long your field names are. Without knowing more about your data set or what you are trying to accomplish in the long term, We will need more information in order to give a more definite answer.
If you can provide more information on your purpose for this join, we can perhaps provide more assistance.
Will there always be a comma after the first and second name? Or, rather, always a comma when there is a third name? Like twinnyfo said, more information will get you more useful responses.
Thanks for the files, but this merely confirmed what we already knew: that some of your names are mismatched in one table compared to the other.
What are you trying to accomplish? Is this a one-time import to match your customer names to a list of names? Or is this going to have to be a permanent join of tables?
If what you are looking for is permanent, one possible solution is to create a third table with two fields: one with the Customer Name and the other field the Pharmacy Name. Then simply match the two names together (this would have to be done manually). Then your join would have this table in between your two main tables. That is not the most perfect of situations, but it would work.
What you really want is normalized tables that would prevent this.
The objective of this is to find members from the membership file provided from membership at Gerimed to our file which was created from central membership, unfortunately the people who creates the membership files take liberties with creating the names, mostly due to laziness!. So errors get generated when a distributor of our products submit rebates for customers against the contract for Gerimed that are not on contract. In short i need to run a query for members that get submitted from Distributors and see if they are truly on the Gerimed roster.
Ahhh, then you need to control how your users select the vendors--through DB Normalization. If anything, they should be selecting those vendors from your main list of pharmacies, using an indexed table. This would prevent them from ever entering a bad name.
This is a DB/Table restructure issue, and perhaps a bit outside the scope of your original question, but is at the heart of the real solution to your problem.
There's no way to get 100% accurate matching when you only want to look at portions of the string. But there are various fuzzy string matching approaches that you can take.
The simplest would twinnyfo's suggestion of looking at just the first x characters to see if they match.
Hi:
I have a file that I have been told is a SQL Server backup from a
server somewhere. The file is about 200MB in size
I am trying to create the database on my local server using RESTORE. I...
Hello to everybody!
I am a C/C++ student and want to learnd DOT NET , but I do not
have any idea what is this DOT NET all about.
So Please Could somebody tell me links of some of the basic...
Hi all,
I have found that IE doesn't seem to respect the <SELECT> "multiple"
attribute when set using DOM methods, although the attribute/property
seems to exist and is updated properly. Those...
How do I go about writing a php application that will alert people in a database
from different RSS news feeds from different sites. So lets say we have
a database and user A has a list of news...
hi,
i've to work on a DB2 project.i'm totally unaware of those concepts.can anyone guide me atleast on the overview of db2.i need specific guidance on connectivity in db2.does it refer tothe...
I'm just looking for some guidance so that I get a start on a school project.
Need to write 3 kind of event for a Bus, Passenger, transit system in which:
-person: arrives at bus Q after random...
Hi,
First let me say that my knowledge of HTML and Javascript is fairly limited. But I am stuck in a situation of trying to adapt a website's shopping cart to a new one.
Here's the problem, the...
Hi,
I have a need to create a table detailing the ID of all contacts and the
last time they were contacted. This information is stored in 2 tables,
'contact' and 'activity' (ID in the 'contact'...
I am using VS 2005 with a formview control trying to insert a record
to my access db. The data is submitted to the main table no problem,
but I need to carry the catID to the bridge table...
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...