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



I'm not sure exactly what you're after James, but you can do explicit subqueries and use them as part or all of the main query with common table expressions more or less like this:

with (fld1, fld2, fld3) a
  as (
   select xxfld1, xxfld2, xxfld3
   from table1
   where <stuff> ),
 ( fld4, fld5, fld6) b
  as (
   select zzfld4, zzfld5, zzfld6
   from table2
   where <morestuff> )
select c.x, c.y, c.z
 from table3 c
 join a
   on a.fld1 = c.x
  and a.fld2 = c.y
  and a.fld3 = c.z
 exception join b
   on b.fld4 = c.x
  and b.fld5 = c.y
  and b.fld6 = c.z
order by c.x

Very powerful stuff. You can even do summary functions in the common table expressions and use them as if they were scalar values. Not magic though. Just like everything else, if you string enough of it together, the lights dim in Boston if you're within the continental US.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.