[Cialug] OT: SQL Help?
Nathan C. Smith
NSmith at hhlawpc.com
Wed Oct 2 13:45:58 CDT 2013
Hello SQL Gurus.
I am trying to do a quick and dirty operation on a mailing list somebody provided to me in Excel. What I want to do is reduce the list so that only one is sent to each household to save paper and postage. The list is something like this:
SampleTable
Fname Lname StreetAddress
Joe Public 801 Towanda Drive
Mary Public 801 Towanda Drive
Joe Jr. Public 801 Towanda Drive
Peter Brady 1401 Decker
Mr. Rogers 1024 bitwise Ave.
You get the idea.
I was just trying to use the tools at hand - MS Excel and msquery. So I set the Excel Table up as a datasource in ODBC.
My plan was to do an outer join - using subqueries- one subquery with
select distinct streetaddress from SampleTable
and the other with
select * from SampleTable
With the Join on StreetAddress
My understanding was if I used an outer join, using my table (in this example) only 3 address records as the required table and the whole table I would only get 3 items in my table. The query gives results, but I get the whole table again (all 5 records) and it does not seem to be working like I expect.
Does anyone else have any thoughts on how I might attack this problem? Keep in mind there are a lot of limitations using JET and msquery. The table does have an ID field to make each row unique.
________________________________
[http://owa.hhlawpc.com/graphics/HHLogo.jpg]<http://www.hhlawpc.com>
This E-mail (including any attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. §§ 2510-2521, is confidential and may contain attorney-client materials and/or attorney work product, legally privileged and protected from disclosure. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please respond to the sender that you have received the message in error, then delete it and destroy any and all copies of it. If you are a client of our firm, this e-mail confirms that communication to you by e-mail is an acceptable way to transmit attorney-client information. Thank you.
More information about the Cialug
mailing list