On ons, 2002-11-13 at 16:12, Dain Sundstrom wrote: > That shouldn't be to hard once we add support for sub queries, but > unless it is supported by most of the major vendors
>(postgres, Supported (ref. help in last post) > oracle, Supported:http://www.cs.uwindsor.ca/meta-index/courses/95F/60-315/temp/combine.html > ms, Supported with EXISTS: http://www.schemamania.org/jkl/booksonline/SQLBOL70/html/2_005_27.htm > ibm), Supported: http://www-3.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/document.d2w/report?fn=db2v7y0db2y040.htm > it wouldn't be worth the work. So, should I add a feature request? > > -dain > > [EMAIL PROTECTED] wrote: > > On Tue, Nov 12, 2002 at 04:53:28PM -0600, Dain Sundstrom wrote: > > > >>What is an INTERSECTION query? > > > >>From postgresql-help: > > > > Syntax: > > SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ] > > * | expression [ AS output_name ] [, ...] > > [ FROM from_item [, ...] ] > > [ WHERE condition ] > > [ GROUP BY expression [, ...] ] > > [ HAVING condition [, ...] ] > > *** [ { UNION | INTERSECT | EXCEPT [ ALL ] } select ] *** > > [ ORDER BY expression [ ASC | DESC | USING operator ] [, ...] ] > > [ FOR UPDATE [ OF tablename [, ...] ] ] > > [ LIMIT { count | ALL } [ { OFFSET | , } start ]] > > > > I think it is used like: > > SELECT personID from persondata where datatype=1 AND value="ln1" > > INTERSECT > > SELECT personID from persondata where datatype=2 AND value="ln2" > > > > finds the persons registered with ln1 as datatype 1 and ln2 as datatype 2. > > > > I think the obvious solution "SELECT personID from persondata where (datatype=1 >AND value=ln1") AND (datatype=2 AND value="ln2") doesn't work, as it compares one and >one row. > > > > In this table, personID isn't unique. > > > > > >> Is it widely supported? > > > > I suppose so in the major DBs, if it isn't a simpler solution to this problem >(using just one SQL statement). > > > > In addition UNION and EXCEPT should be implemented (if these are not possible to >work around). > > > > ------------------------------------------------------- > This sf.net email is sponsored by: Are you worried about > your web server security? Click here for a FREE Thawte > Apache SSL Guide and answer your Apache SSL security > needs: http://www.gothawte.com/rd523.html > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user ------------------------------------------------------- This sf.net email is sponsored by: Are you worried about your web server security? Click here for a FREE Thawte Apache SSL Guide and answer your Apache SSL security needs: http://www.gothawte.com/rd523.html _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user