Hi all

I think the answer is probably no, but here goes. STRQMQRY gives you the
option of which database to connect to, so you can run the SQL over data
on a remote machine, with any *outfile data directed to the local
database. Now I'm wondering if it's possible to join a local file with a
remote one, in order to get remote data onto the local machine that
matches local data. Eg

SELECT * FROM FILEA T1 WHERE EXISTS (SELECT * FROM FILEB T2 WHERE
T1.FIELDA = T2.FIELDA)

where FILEA is on the remote box, and FILEB is local. The aim is to make
my data extraction tool a bit more useful. Currently the majority of our
production files are mirrored to our dev box, so it's easy to grab
subsets of data, but there are a few that aren't. Doing a SAVRSTOBJ is
okay to get a local copy, but when I only want a fraction of the records
it seems a bit overkill. It also might make it more useful to others
that don't have the luxury of consistent local data.

A slightly related question: is the above SELECT statement (assuming all
done locally) an efficient way to get the matching records. I've used
this syntax all the time I've been using SQL, but now seeing lots of
references to inner joins, outer joins, exception joins, etc, I'm
beginning to wonder.

Regards, Martin
--
martin@dbg400.net  jamaro@firstlinux.net  http://www.dbg400.net
/"\
DBG/400 - DataBase Generation utilities - AS/400 / iSeries Open        \
/
Source free test environment tools and others (file/spool/misc)
X
[this space for hire]  ASCII Ribbon Campaign against HTML mail & news  /
\



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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