Division

From: Bernie Huang <bernie(dot)huang(at)ec(dot)gc(dot)ca>
To: PGSQL-SQL <pgsql-sql(at)postgresql(dot)org>
Subject: Division
Date: 2000-09-18 22:47:51
Message-ID: 39C69B97.58B353A9@ec.gc.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Attachment Content-Type Size
bernie.huang.vcf text/x-vcard 315 bytes

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jie Liang 2000-09-18 23:24:59 Re: Division
Previous Message Jie Liang 2000-09-18 17:05:34 info about tables