Re: parameterised SQL views

From: Bob Badour <bbadour_at_golden.net>
Date: Sat, 21 Oct 2000 23:23:19 -0400
Message-ID: <8stmot$rt$1_at_cougar.golden.net>


Hi Paul,

I certainly did not mean to imply in any way that views have no use. They have many uses.

Going back to the earlier example, what would happen if the DateFrom and DateUntil columns were derived from data in a different table, and you had a view like:

Create View Emp as
select e.*

, h.date as DateFrom
, coalesce(t.date,'99991231') as DateUntil
from ( employee e join job_record h

           on e.empid = h.empid
        ) left outer join  job_record t
        on h.empid = t.empid
        and h.job_id = t.job_id

where h.record_type = 'Hire'
  and t.record_type = 'Term'
;

Consider how much more complex the Prolog might be without the view (Y10K problem notwithstanding).

Regards,
Bob Received on Sun Oct 22 2000 - 05:23:19 CEST

Original text of this message