473,657 Members | 2,407 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Looking for Mismatched Addresses

I've figured out a convoluted solution to this problem, but I'm hoping
for something a bit more elegant.

I have a table of orders as they're received from customers (the
BillCust and Orders tables, related on BillCustID), and a query of how
those orders ultimately appear in our accounting software
(qrySummit_SBCL IENT_Prep).

I want to set up a query that will let me see those records where, for
example, the Address1 fields from those two tables do not match (i.e.
because the accountant can't type properly).

The accounting query and the Orders table are related on the OrderID
field.

My thought was to set up an OUTER JOIN query that shows all records
from the accounting query but only those records from the BillCust
table where the Address1 fields are equal. Then in the resulting
query, any record where there's an Address1 from the query but the
Address1 from BillCust is blank, I know there's a mismatch.

However, I want to be able to see the two records side by side in a
single query so I can see exactly what the mismatch is:

OrderID BillCustAddress 1 AccountingAddre ss1
12345 123 Main St 1223 Main St

What's the best way to go about this? Thanks!

Jul 7 '08 #1
7 1506
Greetings,

Your problem is that your system allows the same data to be entered from
more than one location - entering the same data more than once. The
whole concept of an RDBMS system is that you enter data only once. Then
that data gets propagated programmaticall y. If your system allows the
same data to be entered more than once - it is time to create a new
system which does not allow this (use referenctial integrity to enforce
this). That is the solution. This way, even if data gets entered
incorrectly - it will at least be the same throughout the system and
thus, you will be able to query against it.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Jul 7 '08 #2
On Jul 7, 2:03*pm, Rich P <rpng...@aol.co mwrote:
Greetings,

Your problem is that your system allows the same data to be entered from
more than one location - entering the same data more than once. *The
whole concept of an RDBMS system is that you enter data only once. *Then
that data gets propagated programmaticall y. *If your system allows the
same data to be entered more than once - it is time to create a new
system which does not allow this (use referenctial integrity to enforce
this). *That is the solution. *This way, even if data gets entered
incorrectly - it will at least be the same throughout the system and
thus, you will be able to query against it.

Rich

*** Sent via Developersdexht tp://www.developersd ex.com***
Rich-
Unfortunately, I work in a company with over 500 employees and a
complete revamp of our accounting system is simply not viable, nor
anywhere near my decision-making powers. Trust me, I know the best
solution in a perfect world, but I'm trying to figure out the best
solution in my hellish, ummalleable corporate reality.
Jul 7 '08 #3
DanCole42 <da*******@gmai l.comwrote in news:3f350630-86ff-4341-9f8d-
7d**********@k3 0g2000hse.googl egroups.com:
On Jul 7, 2:03*pm, Rich P <rpng...@aol.co mwrote:
>Greetings,

Your problem is that your system allows the same data to be entered from
more than one location - entering the same data more than once. *The
whole concept of an RDBMS system is that you enter data only once. *The
n
>that data gets propagated programmaticall y. *If your system allows the
same data to be entered more than once - it is time to create a new
system which does not allow this (use referenctial integrity to enforce
this). *That is the solution. *This way, even if data gets entered
incorrectly - it will at least be the same throughout the system and
thus, you will be able to query against it.

Rich

*** Sent via Developersdexht tp://www.developersd ex.com***

Rich-
Unfortunately, I work in a company with over 500 employees and a
complete revamp of our accounting system is simply not viable, nor
anywhere near my decision-making powers. Trust me, I know the best
solution in a perfect world, but I'm trying to figure out the best
solution in my hellish, ummalleable corporate reality.
Wouldn’t the best solution in a world of such utter stupidity not be a best
solution but a worst solution? ... plenty of people here to provide that!
Jul 7 '08 #4
With all due respect - in a situation like that - you may want to weigh
your options. Believe me, I have worked in such a situation -
basically, I was just a warm body filling a spot. Even though I had
mentioned about a revamp - it fell on deaf ears. Finally, someone
higher up noticed some inconsistencies in the data. The revamp
consisted of going back to mainframes, and I had to move on. From that
time forward, if I saw a similar situation and my suggestions for a fix
were not an option - then I would politely turn down the offer and move
on my way.

If fixing the problem is not an option - one other fix is to manually
fix the data - which puts you back on square one because if the system
has this design flaw then there are probably several design flaws, and I
will wager that there probably isn't even any referential integrity in
place and you will have a very difficult time matching up the unmatching
data. On that note - if wish you well.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Jul 7 '08 #5
On Jul 7, 2:26*pm, lyle fairfield <lylef...@yah00 .cawrote:
DanCole42 <dancol...@gmai l.comwrote in news:3f350630-86ff-4341-9f8d-
7d7b44b87...@k3 0g2000hse.googl egroups.com:


On Jul 7, 2:03*pm, Rich P <rpng...@aol.co mwrote:
Greetings,
Your problem is that your system allows the same data to be entered from
more than one location - entering the same data more than once. *The
whole concept of an RDBMS system is that you enter data only once. *The
n
that data gets propagated programmaticall y. *If your system allows the
same data to be entered more than once - it is time to create a new
system which does not allow this (use referenctial integrity to enforce
this). *That is the solution. *This way, even if data gets entered
incorrectly - it will at least be the same throughout the system and
thus, you will be able to query against it.
Rich
*** Sent via Developersdexht tp://www.developersd ex.com***
Rich-
Unfortunately, I work in a company with over 500 employees and a
complete revamp of our accounting system is simply not viable, nor
anywhere near my decision-making powers. Trust me, I know the best
solution in a perfect world, but I'm trying to figure out the best
solution in my hellish, ummalleable corporate reality.

Wouldn’t the best solution in a world of such utter stupidity not be a best
solution but a worst solution? ... plenty of people here to provide that
Larry Linson, John Vinson and Lyle Fairfield somehow all showed up at
the same time at the pearly gates. All three were told by St. Peter
that they would have to spend one year in purgatory to cleanse their
conscience of some questionable database practices. First, they found
that Larry had a data collision early in his career. Zap! He was
handcuffed to an extremely ugly woman. Then they found that John had
messed up some Referential Integrity once. Zap! He was handcuffed to
an even more ugly woman. They started searching Lyle's records.
Zap! He was handcuffed to an extremely beautiful redhead. "They must
have liked my work," he said. "Don't flatter yourself," she said. "I
never split any of my databases!"

James A. Fortune
CD********@Fort uneJames.com
Jul 8 '08 #6
CD********@fort unejames.com wrote in
news:60******** *************** ***********@2g2 000hsn.googlegr oups.com:
Larry Linson, John Vinson and Lyle Fairfield somehow all showed up at
the same time at the pearly gates. All three were told by St. Peter
that they would have to spend one year in purgatory to cleanse their
conscience of some questionable database practices. First, they found
that Larry had a data collision early in his career. Zap! He was
handcuffed to an extremely ugly woman. Then they found that John had
messed up some Referential Integrity once. Zap! He was handcuffed to
an even more ugly woman. They started searching Lyle's records.
Zap! He was handcuffed to an extremely beautiful redhead. "They must
have liked my work," he said. "Don't flatter yourself," she said. "I
never split any of my databases!"
Only a year? The time would pass so fast, lickety-split!
Jul 8 '08 #7
Dan,

As others have stated, you have an "issue" with your systems not
talking; that said, here is a possible solution to your query
problems.

First, setup that query you layout where Address from BillCust is
blank, indicating a mismatch. In this query, setup a new field that
displays "Mismatch" if and when the BillCust field is blank. It sounds
like you probably know how to do something like this, in the event
that you don't it goes something like this in the Field "row" of a new
"column" in your Access query builder:
Mismatch: IIf([BillCust] = "", "Mismatch", "")
You may have to play around with the syntax, I can never remember
these things

Now build a second query which includes the first query with the
Mismatch field, as well as the tables that contain your OrderID,
BillCustAddress 1 and AccountingAddre ss1. Populate the query as you
suggest above so that the record mismatches are shown side by side.
Now, set the Criteria for Mismatch equal to <>"" or some other variety
of manual filter; I've used a couple different varieties, and I always
have to screw around with them to get them to work.

At this point you should be all set.

Hope that helps.

Kelii
Jul 9 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3330
by: Hoang | last post by:
anyone know of an algorithm to filter out real email addresses as opposed to computer generated email addresses? I have been going through past email archives in order to find friends email address. Unfortunately about 75% of them are junk addresses or spammer addresses. It's quite obvious when you look at it and delete it... but you don't want to do it by hand.
8
1216
by: Jonathan Gennick | last post by:
Once again, I find myself looking to contact contributors to the Python Cookbook, this time for chapter 2. If you know how to contact any of the people listed below, please contact me at jgennick@oreilly.com . It would be a big help. Matteo Dell'Amico Sebastien Keim Yakov Markovitch Amos Newcombe John Nielsen
0
2419
by: Brett E. | last post by:
I am attempting to link a stand alone server C++. We recently moved to the 64 bit HP OS environment. Our other C++ Tuxedo services have effectively linked and successfully tested out fine under this OS, 3rd party library, and Oracle upgrade. However, I encounter this error message for this revamped C++/Source pro server I am re-writing. I can derive several guesses for what the potential problems are, but I would welcome a more...
2
1662
by: Not Me | last post by:
Hi, I've been having this problem for a while now and seem to be getting closer to a solution but it's still not perfect. I have a table of addresses, people (refno's) may have more than one address, but the preferred one is marked as direct. I wish to create a query that shows one row for each reference number, and then either their direct address, or (only if they have no direct address) any of their other addresses.
1
4263
by: Lyle Fairfield | last post by:
Option Explicit ' requires VBScript to be installed ' (maybe don't give this to your sugnificant other as ' it gets deleted addresses as well as current) ' obvious fixups needed '1. how get wab file location ' further development '1. get names too? ' maybe some WABs are encrypted
3
1889
by: Andrew McLean | last post by:
I'm looking at putting some e-mail contact addresses on a web site, and wanted to make it difficult for spammers to harvest them. I found some Python code that I can call within my application. http://www.zapyon.de/spam-me-not/ It works exactly as expected. However, I am concerned that the technique used for obsfucating the e-mail address may be a bit weak.
1
3062
by: virag | last post by:
Hi all, I am getting a Mismatched ABI error while trying to build my C++ application on "hp-11.11" OS. Any idea, what could be possibly causing it.
3
5687
by: brevello | last post by:
Hi, I'm trying to parse an XML file with Python SAX: xml.sax If i parse the file with an empty Handler it works perfectly, no error of mismathed tag. But if i try to print the characters of the tags i get the error: xml.sax._exceptions.SAXParseException: theFile.xml:2426:6: mismatched tag I'm working with a file which has latin1 encoding mixed with utf-8. If i change the original file from latin1 to utf-8, i get characters like <AE> and...
3
1990
by: Martin Kulov [MVP] | last post by:
Hi, I am wondering if this problem is still valid for ASP.NET 2.0. "To maintain session state across different Web servers in the Web farm, the application path of the Web site (for example, \LM\W3SVC\2) in the Microsoft Internet Information Services (IIS) metabase must be the same for all of the Web servers in the Web farm. The case also needs to be the same because the application path is case-sensitive."
4
5087
by: =?Utf-8?B?U2VyZ2Vp?= | last post by:
Dear staff Can I get your assistance with \3GB (LARGEADDRESSAWARE) switch in mixed mode process built by VS 2008, please? I have a mixed mode application: C# GUI calling native C++ DLL through managed C++ wrapper. And I want to give the native C++ code access to large (>2G) addresses; but (if it’s possible) I do not want the managed code to use this extra GB of virtual memory. Questions are:
0
8411
marktang
by: marktang | last post by:
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8323
by: Hystou | last post by:
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8838
Oralloy
by: Oralloy | last post by:
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
jinu1996
by: jinu1996 | last post by:
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8613
tracyyun
by: tracyyun | last post by:
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7351
agi2029
by: agi2029 | last post by:
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2740
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.