Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Legal syntax or fluke?
/* Display duedate for DBA.cust_order with each average of balance
by duedate between 400 and 500 */
select t1.duedate
from "DBA".cust_order t1
where t1.duedate in
(select t2.duedate from "DBA".cust_order t2 where not exists (select * from "DBA".cust_order t3 where t2.duedate = t3.duedate having avg(t3.balance) not between 400 and 500))
I have a product that generates the above syntax from the input comment, but it only works on Oracle8 (not DB2 and not Sybase). Regardless of the sanity of the statement - is it actually legal in ANSI SQL? Thanks for any hints.
--
Mike Schuler
http://www.dbsurfer.com
Voice 604.926.2676
Sent from Netscape:Oahu node
Received on Sat Feb 27 1999 - 09:44:02 CST