Received: from mercury.dnai.com (mercury.dnai.com [207.181.194.99]) by hub.org (8.8.8/8.8.8) with ESMTP id VAA10268 for ; Mon, 19 Oct 1998 21:17:44 -0400 (EDT) (envelope-from michaelo@dnai.com) Received: from dnai.com (dnai-207-181-255-16.dialup.dnai.com [207.181.255.16]) by mercury.dnai.com (8.8.7/8.8.7) with ESMTP id SAA08472; Mon, 19 Oct 1998 18:17:13 -0700 (PDT) Sender: michael@mercury.dnai.com Message-ID: <362BE4D4.37DBE055@dnai.com> Date: Mon, 19 Oct 1998 18:18:12 -0700 From: Michael Olivier X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.35 i686) MIME-Version: 1.0 To: pgsql-sql@postgresql.org CC: michaelo@dnai.com Subject: timespan question: using value from row in select Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi folks, I'm trying to write a SELECT statement that uses a min_age column (integer expressing a number of years) as part of a timespan: select * from users U where age('now', '01-01-1970') >= timespan('U.min_age years'::timespan); ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERROR: parser: parse error at or near "error" Is there some way to do this? I want to convert an int expressing years into a timespan, within a select statement. Thanks for any insights on how to do this. --Michael