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

Home -> Community -> Usenet -> c.d.o.server -> Re: OracleRdb and Oracle 7 SQL differences

Re: OracleRdb and Oracle 7 SQL differences

From: Bob Nightingale <nighr_at_hotmail.com>
Date: 1998/09/20
Message-ID: <6u3k3s$14d$6@inet-prime.comshare.com>#1/1

John Tait wrote in message <35F4F49A.8EDADA08_at_ihug.co.nz>...
>I am currently implementing a set of views which had been developed for
>OracleRdb onto an Oracle 7 database, but have a problem with a syntax
>which is allowed under OracleRdb but not Oracle 7 SQL.
>
>Under OracleRdb, the views make a lot of use of the following
>(simplified) syntax
>
>select job.job, period.period,
> (sum(cost.movement)
> from costs cost
> where cost.job = job.job
> and cost.period >=1
> and cost.period <= period.period)
>from
>jobs job,
>periods period;
>

You are missing something here. For the Jobs table you have just the job field. For the Costs table you have specified (job,movement,period). For Periods table, you've only specified the period field. I would suggest as nested SQL statement to sum and filter movement. Is JOB the implied key field in each of the three tables?

--Bob. Received on Sun Sep 20 1998 - 00:00:00 CDT

Original text of this message

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