× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: SQL select via logicals
  • From: DAsmussen@xxxxxxx
  • Date: Thu, 27 Nov 1997 00:39:51 -0500 (EST)

Walden,

In a message dated 97-11-25 20:51:39 EST, you write:

> Am I losing my mind? (Don't answer that!) Anyway, if I am issuing a select
>  over a logical and that logical has select/omit but I do NOT specify that
>  select/omit in my where clause I thought that SQL would not use that
select
>  criteria. I just saw an example that led me to believe that this was not
the
>  case. That is to say, if I select * from lgl1 and lgl1 has select criteria
>  then the select will only have the records in the result set that match
the
>  selection criteria. Am I nuts?

I'll avoid the "I asked you not to tell me that" response.  Suffice it to say
that, SQL picks the logical it wants (if the ORDER BY clause matches the
oldest 5 logicals on the physical, otherwise, it builds its own anyhow).  We
_STRICLTLY_ specify SQL against the physical for the latter reason.
 Specifying a logical file in your SQL statement _DOES NOT_ guarantee that
the chosen logical will be used.

An easy way to do this is to execute a STRDBG prior to executing your program
with the embedded SQL.  After the program has run, ENDDBG and DSPJOBLOG to
see which path was chosen.  You'll probably find that the chosen path _WAS
NOT_ the one specified in your EXEC SQL statement...

HTH,

Dean Asmussen
Enterprise Systems Consulting, Inc.
Fuquay-Varina, NC  USA
E-Mail:  DAsmussen@aol.com
+---
| 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
+---


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