Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle SQL question? Fiscal Years, soft deletes and historical data
bbcrock_at_gmail.com wrote:
> I have a report query that current looks something like this:
>
> SELECT *
> FROM lookuptable, childtable
> where lookuptable.id = childtable.fkid
> AND lookuptable.begin_date < sysdate
> AND (lookuptable.end_date > sysdate or lookuptable.end_date is null)
>
> I would prefer to modify this in the SQL query to check for the
> following:
>
> The user can look at all child data valid for previous fiscal years
> even if the current Lookuptable info is invalid.
Use an outer join.
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Mon Feb 06 2006 - 13:01:15 CST
![]() |
![]() |