MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » November 2008

Re: Today's SQL Brain Teaser



fixed

Exeption Join "SYSTABLES" with itself on "file name" and "library"
adding TEST in one of them.

Charles Wilt escribió:
with tbl as (select atlib, atfile,
length(rtrim(atlib)) - 4) as matchLib
from dspfd
where atlib like '%FTEST'
)
select atlib, atfile
from dspfd A left exception join tbl B
on A.atlib = b.matchLib and A.atfile = B.atfile


This gives you files from <PREFIX>F that don't exist in <PREFIX>FTEST.

Do you want files in <PREFIX>FTEST that don't exist in <PREFIX>F?

HTH,
Charles

On Mon, Nov 10, 2008 at 4:10 AM, David FOXWELL <David.FOXWELL@xxxxxxxxx>wrote:


Hi all,

I have several libraries named <PREFIX>F each having a duplicate library
named <PREFIX>FTEST.

All files in library <PREFIX>F SHOULD have a file with the same name in
<PREFIX>FTEST. However, there are imperfections and now many files don't
exist in the library <PREFIX>FTEST.

I have a file named DSPFD resulting from DSPFD *ALLUSR/*ALL to work with.


I want to list the missing files from the libraries named LIKE '%FTEST%'


No prizes, just thanks for the best reply :


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









Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact