Paul Wehr <paul@industrialsoftworks.com> writes:
> create view complex_view as select blah, ..... , effective_date.date
> from tablea, tableb, tablec, effective_date
> where tablea.foo=tableb.foo
> ....
> and effective_date.date between tablec.start_date=tablec.end_date
> ;
> insert into effective_date values ('09/23/2000'); -- may "fail" if date is
> already in the table, but if it is, who cares?
> select *
> from complex_view
> where date='09/23/2000';
Er, why don't you just do
select * from complex_view
where '09/23/2000' between start_date and end_date;
I don't see what the effective_date table is buying ...
regards, tom lane