×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Yes I think that you correct - thanks for the tip!
I actually don't need DISTINCT at all - it does the join properly without it when using EXISTS.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Michael Naughton
Sent: Tuesday, November 27, 2012 1:07 PM
To: Midrange Systems Technical Discussion
Subject: Re: SQL join with distinct
Joel -
You got some good answers to your question, but why do you care that the "distinct" be applied prior to the join? Wouldn't you get the same result if you applied it afterwards?
Just curious ...
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> writes:
I would like to run the following, but reduce the "B" file down to distinct key values PRIOR to the join.
Can this be accomplished in one SQL step?
select a.* from miscchg A, miscchgtmp B
where a.ASHPNBR = b.ashpnbr
and a.ABLDNGD = b.ABLDNGD
Maybe using "IN"? But that only works with one column, not two as I need.
Thanks!
Mike Naughton
Senior Programmer/Analyst
Judd Wire, Inc.
124 Turnpike Road
Turners Falls, MA 01376
413-676-3144
Internal: x 444
mnaughton@xxxxxxxxxxxx
****************************************
NOTICE: This e-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that any use is
strictly prohibited. If you have received this e-mail in error, please notify us immediately by replying to it and then delete it from your computer.
As an Amazon Associate we earn from qualifying purchases.