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



the trouble is the linkage between city and state -

if you're trying to find records in filea that don't exist in fileb,
here you go:

select distinct
a.state,
a.city
from filea a
where a.state||a.city not in
      (select b.state||b.city
         from fileb b
         where a.state = b.state
            and a.city = b.city)
order by a.state, a.city

hth,

Rick

On 1/16/07, Shannon O'Donnell <shannon.odonnell@xxxxxxxxxxxxxx> wrote:
Can someone give me an example of how to do the following with SQL on
iSeries? (STRSQL)



I mean, I would like an example of the syntax to accomplish this...





Files:      LIBRARY1/FILE1,    LIBRARY2/FILE2



Fields:   FILE1.ASTATE,            FILE1.ACITY

Fields:   FILE2.XRSTATE,           FILES2.XRCITY





Request: Select the records from FILE1 where FILE1.ASTATE <>
FILE2.XRSTATE and FILE1.ACITY <> FILE2.XRCIT  and display distinct
records only  Grouped by FILE1.ASTATE, FILE1.ACITY





This seems like such a simple thing but for some reason I cannot get the
syntax right today.



Thanks!



Shannon O'Donnell

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.