• Subject: Re: SQL EXISTS predicate
  • From: Howard Weatherly <hweatherly@xxxxxxxxxxxx>
  • Date: Tue, 09 Mar 1999 09:17:42 -0500
  • Organization: Computer Task Group

Rob, 

It depends upon what you wish to do, for example if you want to find out
what is "not" somewhere, you coud say something like:

eg... SELECT A.F1 FROM T1 A EXCEPTION JOIN T2 B ON A.F1=B.F1

Returns records from left table that do not have a match in the right
table.
Ref: 5.4.3 DB2 for AS/400 SQL Programming 4.2 (in all books book shelf)

This avoids using the Where exists or Not exists stuff. In any case if
you look up that reference, you will find information about the EXISTS
predicate in that general vacinity. I know this is not exactly what you
wanted but usually when folks start looking at EXISTS the mission is
usually to discover what is not someplace!

Rob Berendt wrote:
> 
> Does anyone have a good example of the SQL exists predicate?  I am having a 
>tough time understanding how this is used.
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---

-- 
____________________________________________________________

Howard Weatherly

(616)961-4324

hweatherly@dlis.dla.mil
hweath@ibm.net
howard_weatherly@ctg.com
begin:vcard 
n:Weatherly;Howard
tel;pager:(800)691-7499
tel;cell:(616)260-6796
tel;fax:(616)961-7091
tel;home:(616)979-8739
tel;work:(616)961-4324
x-mozilla-html:TRUE
org:Computer Task Group / Battle Creek Federal Ctr.
adr:;;74 N. Washington;Battle Creek ;Michigan;49017;US
version:2.1
email;internet:hweatherly@dlis.dla.mil
title:Sr. Software Engineer.
x-mozilla-cpt:;0
fn:Howard Weatherly
end:vcard

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2019 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].