Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle SQL question? Fiscal Years, soft deletes and historical data

Re: Oracle SQL question? Fiscal Years, soft deletes and historical data

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 06 Feb 2006 11:01:15 -0800
Message-ID: <1139252469.382310@jetspin.drizzle.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US