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: SQL question!

Re: SQL question!

From: <jpetts_at_celltech.co.uk>
Date: Thu, 22 Oct 1998 13:50:16 GMT
Message-ID: <362f37c9.513109212@firewall.celltech>


On Thu, 22 Oct 1998 08:56:56 GMT, jmodic_at_src.si (Jurij Modic) wrote:

>SQL> SELECT rownum, y.ven_no, y.yymm, -y.total total FROM

> 2 (SELECT MIN(x.ven_no) ven_no, x.yymm, -x.total total FROM
> 3 (SELECT ven_no, SUBSTR(pay_date,1,6) yymm, SUM(pay_amt) total
> 4 FROM pay
> 5 WHERE pay_date BETWEEN '19981001' AND '19981031'
> 6 GROUP BY ven_no, SUBSTR(pay_date,1,6)) x
> 7 GROUP BY -x.total, x.yymm) y
> 8 /

This prefixing of a table aliad with a minus sign is something I've not come across before. What does it doe? Is it supported by Oracle?

James Received on Thu Oct 22 1998 - 08:50:16 CDT

Original text of this message

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