Received: from rdms.pyr.ec.gc.ca (fwvan1.pyr.ec.gc.ca [199.212.20.2]) by hub.org (8.10.1/8.10.1) with ESMTP id e8IN0gs64341 for ; Mon, 18 Sep 2000 19:00:42 -0400 (EDT) Received: from ec.gc.ca (IDENT:huangb@rdms.pyr.ec.gc.ca [131.235.150.90]) by rdms.pyr.ec.gc.ca (8.9.3/8.9.3) with ESMTP id PAA12267 for ; Mon, 18 Sep 2000 15:47:54 -0700 Message-ID: <39C69B97.58B353A9@ec.gc.ca> Date: Mon, 18 Sep 2000 15:47:51 -0700 From: Bernie Huang Organization: Environment Canada X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 To: PGSQL-SQL Subject: Division Content-Type: multipart/mixed; boundary="------------2B834232408E08E724DEB8FA" X-Archive-Number: 200009/131 This is a multi-part message in MIME format. --------------2B834232408E08E724DEB8FA Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Hi, I tried the write up the following SQL statement: result1 from sql1 = (1,2,3,4,5) result2 from sql2 = (4,5) result3 = result1/result2 (or is it result2/result1) = (1,2,3) What do I have to do to get the (1,2,3) result? I tried "query EXCEPT query", but it seems like EXCEPT needs both tables in queries to be of the same number of columns and column types. And (any, all, exist) doesn't seem to be a right solution. Thanks for help. - Bernie --------------2B834232408E08E724DEB8FA Content-Type: text/x-vcard; charset=iso-8859-15; name="bernie.huang.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Bernie Huang Content-Disposition: attachment; filename="bernie.huang.vcf" begin:vcard n:Huang;Bernie tel;fax:(604)664-9195 tel;work:(604)664-9172 x-mozilla-html:TRUE org:Environment Canada;Standards and Technology Services adr:;;700-1200 West 73 Ave.;Vancouver;BC;V6P 6H9;Canada version:2.1 email;internet:bernie.huang@ec.gc.ca title:Programmer x-mozilla-cpt:;0 fn:Bernie Huang end:vcard --------------2B834232408E08E724DEB8FA--