× 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.



Yeah, UNION came to mind, but unless I do a left-outer combined with an
exception I think I'll get dups... and I'm not sure that the combination
will get all that I want. (I didn't say, but hope I implied that I want any
employee record only one time). Of course I could do group by. Hmmm...

It's something to consider. Thanks!

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"Seeing ourselves as others see us would probably confirm our worst
suspicions about them."
-- Franklin Jones

Maybe UNION is what you want
Select DEDEMP from DEDBAL
UNION
select INCEMP from INCBAL

and as the employee number is present on PRMAST, then you can ignore
PRMAST


Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill



"Dennis Lovelady"
<iseries@lovelady
.com>
To
Sent by: "'Midrange Systems Technical
midrange-l-bounce Discussion'"
s@xxxxxxxxxxxx <midrange-l@xxxxxxxxxxxx>

cc

06/10/2010 04:00
Subject
PM SQL Join - all rows from any
table
for employee

Please respond to
Midrange Systems
Technical
Discussion
<midrange-l@midra
nge.com>






We have three tables: DEDBAL, INCBAL, and PRMAST.



Each of these contains an employee number (DEDEMP, INCEMP, PREMP). We
want to produce output where an employee is represented in either
DEDBAL and INCBAL or both. (For the sake of argument, we can assume
that PRMAST is present for each employee).



I've tried various types of joins (LEFT OUTER, FULL, et cetera) and
have pored through the archives and GOOGLE and come up empty on a means
of doing this exactly right. (I'm convinced this is a common issue; so
my issue is probably my choice of search words - usually resulting in
too many hits).
Would some kind soul mind directing me to guidelines on how to write
the JOIN for this challenge?



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.