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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Linking two tables with Dates

Re: Linking two tables with Dates

From: nick <nick-love_at_juno.com>
Date: Tue, 20 Feb 2001 18:30:07 -0000
Message-ID: <t95dtfng5l2360@corp.supernews.com>

Zanfar Ali wrote:
>
>
>
> I have two tables called work and payrate:
>
> in work there is two fields a date and a description.
>
> WORK
> DATE DESCRIPTION
> 20-Feb-2001 worked on sometething
> 15-Feb-2001 worked on sometething
> 14-Feb-2001 worked on sometething
> 12-Feb-2001 worked on sometething
>
> in payrate i have a history of a persons payrates and the date it was set
>
> PAYRATE
> DATSET RATE/Hour
> 16-Feb-2001 23.45
> 12-Feb-2001 21.45
>
> the dateset means that from 12-Feb-2001 to 15-Feb-2001 the payrate was
 21.45
> and then from 16-Feb-2001 to today the payrate was 23.45.This table can
 have
> more entries.
>
> What i need to do is to link the work table entries with the
 corresponding
> payrate...?
>
> Any help will be highly appreciated!
>
>

   select work.date, description,payrate,datset    from work, payrate
   where work.date=payrate.datset
   and work.date=payrate;
I'm assumed that the DATSET is the FK to the Work table?? right??

--
Posted via CNET Help.com
http://www.help.com/
Received on Tue Feb 20 2001 - 12:30:07 CST

Original text of this message

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