473,386 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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_SBCLIENT_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 BillCustAddress1 AccountingAddress1
12345 123 Main St 1223 Main St

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

Jul 7 '08 #1
7 1493
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 programmatically. 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.comwrote:
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 programmatically. *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 Developersdexhttp://www.developersdex.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*******@gmail.comwrote in news:3f350630-86ff-4341-9f8d-
7d**********@k30g2000hse.googlegroups.com:
On Jul 7, 2:03*pm, Rich P <rpng...@aol.comwrote:
>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 programmatically. *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 Developersdexhttp://www.developersdex.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...@gmail.comwrote in news:3f350630-86ff-4341-9f8d-
7d7b44b87...@k30g2000hse.googlegroups.com:


On Jul 7, 2:03*pm, Rich P <rpng...@aol.comwrote:
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 programmatically. *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 Developersdexhttp://www.developersdex.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********@FortuneJames.com
Jul 8 '08 #6
CD********@fortunejames.com wrote in
news:60**********************************@2g2000hs n.googlegroups.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,
BillCustAddress1 and AccountingAddress1. 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
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...
8
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...
0
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...
2
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...
1
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...
3
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. ...
1
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
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...
3
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,...
4
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
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...

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.