• Subject: Re: SQL select via logicals
  • From: DAsmussen <DAsmussen@xxxxxxx>
  • Date: Fri, 5 Dec 1997 23:39:55 EST
  • Organization: AOL (http://www.aol.com)


In a message dated 97-11-30 22:27:04 EST, you write:

> > > > You're safe here. Even though QQQQuery might use a different access
>  > >  > to improve performance, it will only return rows that are included
>  > >  > the access path that you specify, and the columns that are returned
>  > >  > always be based on the view that you specify.
>  >   
>  > Sorry, but I must disagree. Interactive SQL against files to prove
>  > has proven otherwise...
>  Okay, look, here's my question. If I issue and SQL request against a
>  and the logical is built with select/omit criteria, will the records
>  returned be filtered by the s/o criteria? 
>  I have always counted on this for query, but I don't know if SQL behaves
>  same way. I would expect it to, since I might give access to a logical for
>  purposes of security.

No, your records will not necessarily be returned based upon the S/O criteria.
SQL evaluates the n (used to be five, may now be ten or more) oldest logical
files by creation date based upon the ORDER BY and WHERE clauses to decide
whether or not it needs to build an access path.  If you have an ORDER BY
statement that doesn't match the WHERE (select/omit) and key of those older
logicals, you may not get the logical specified in your SELECT statement.
Again, issue STRDBG during testing prior to invoking your imbedded SQL program
and display the job log after invocation -- this will show you whether an
access path was selected or built...


Dean Asmussen
Enterprise Systems Consulting, Inc.
Fuquay-Varina, NC  USA
E-Mail:  DAsmussen@aol.com

"If you look like your passport photo, you're too ill to travel." -- Will
| 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 on our policy page. If you have questions about this, please contact [javascript protected email address].