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



If I have a collection of WHERE clauses...

Select x,y,z from MyFile
where years_experience > 10
or years_college >= 4
or PMP = 'YES'
fetch first row only

...are the clauses tested in order or does the optimizer find one row from
the optimized access path (or through a table scan) regardless of how the
statement is coded and quit?

In this example, the goal is to select a row where years_experience > 10,
and if no rows qualify, select a row where years_college >= 4, and so on.

Other than executing multiple SQL statements, is there a good technique for
controlling the selection process? I'm trying to get my head around an
ORDER BY/CASE construct but I don't quite have it.

Thanks!

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.