|
I think what you need here are three files. One file for the UPSTP values, another for UPTYP values to be excluded, and a third for the UPSTS values to be excluded. You SQL statement would then look somethink like this: Select count(*) from UPRM join UPSTPFILE on UPSTP = UPSTPFLD exception join UPTYPEXCL on UPTYP = UPTYPFLD exception join UPSTSEXCL on UPSTS = UPSTSFLD or, if the above does not work, Select count(*) from UPRM join UPSTPFILE on UPSTP = UPSTPFLD where UPTYP not in (Select UPTYPFLD from UPTYPEXCL) and UPSTS not in (Select UPSTSFLD from UPSTSEXCL) Hope that helps. Donald R. Fisher, III Project Manager The Roomstore Furniture Company (804) 784-7600 extension 2124 DFisher@roomstoreeast.com <clip> I have an existing sql statement that looks like this. SELECT count(*) FROM UPRM WHERE UPSTP IN(0,9999) and UPSST NOT LIKE '#%' AND UPTYP NOT IN ('HG', 'PC', 'PE', 'PF', 'PH', 'PI','PO', 'PR', 'PS', 'PX') AND UPSTS NOT IN('CD', 'RT', 'SS') I have been asked to take all the selection criteria and put it in a control file so that if the selection values change I don't have to change the query. <clip>
As an Amazon Associate we earn from qualifying purchases.
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.