Pete

At 08:45 PM 11/27/1997 -0600, you wrote:
>In message <199711272046.UAA171368@out1.ibm.net>, From Chris Rehm 
><Mr.AS400@ibm.net>, the following was written:
>> I would have made the opposite
>> assumption, feeling that if I specified a logical it was because the 
>> records I wanted from the file were are subset of that logical. 
>
>Chris,
>
>You're safe here. Even though QQQQuery might use a different access path
>to improve performance, it will only return rows that are included in
>the access path that you specify, and the columns that are returned will
>always be based on the view that you specify.

There are at least 2 ways to go here, I think. If you know a certain
logical gives you the view you want (field list, S/O criteria), then
specify that logical in the SQL statement. This behaves something like an
SQL VIEW.

OTOH, you can specify the physical and use the WHERE clause to specify the
same criteria as the S/O. In this case, I believe the optimizer will try to
use the appropriate access path, including the possibility of the S/O logical.

The latter approach fits in better, it seems, with standard SQL practice.
It seemed easier in one of our projects to communicate to an outside
contractor in the second way, than to try to say too much about
AS/400-specific stuff around logical & physical files with everything that
entails.

Cheers

Vernon Hamberg
Systems Software Programmer
Old Republic National Title Insurance Company
400 Second Avenue South
Minneapolis, MN  55401-2499
(612) 371-1111 x480


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@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
+---


This thread ...


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 here. If you have questions about this, please contact [javascript protected email address].