X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 340CB8B9C8B for ; Thu, 10 Feb 2005 22:46:33 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07745-03 for ; Thu, 10 Feb 2005 22:46:11 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.196]) by svr1.postgresql.org (Postfix) with ESMTP id 4BE468B9E31 for ; Thu, 10 Feb 2005 22:46:05 +0000 (GMT) Received: by rproxy.gmail.com with SMTP id a41so212220rng for ; Thu, 10 Feb 2005 14:46:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=oaJNidAxzYF0p9nfzOe9zn9DoIShZL8LVeytl04ITph+bJbn4yqEGcmvyJhANChQjG4+1p8HAoNk6pp/mUaRlzJQl8lsbRbXtgjdICIMTMaacdvx3xGQ+UUk7OOXvB9sP9qjnKYwsKnfFVn3itPwpo2Uy+/Eu6sL1bEsHBGg8mg= Received: by 10.38.59.26 with SMTP id h26mr93178rna; Thu, 10 Feb 2005 14:45:14 -0800 (PST) Received: by 10.38.149.34 with HTTP; Thu, 10 Feb 2005 14:45:11 -0800 (PST) Message-ID: <2bffcc33050210144524608491@mail.gmail.com> Date: Thu, 10 Feb 2005 17:45:11 -0500 From: Johnny C Reply-To: Johnny C To: pgsql-sql@postgresql.org Subject: append fields for *where...* Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200502/130 X-Sequence-Number: 20241 I have the following tables: TABLE A month | year | item | num 1 2005 myitem 003 TABLE B num | date | descr 003 02-01-2005 blahblah 003 01-01-2005 toratora I am trying to come up with something like: select date,item,descr from TABLEA a LEFT OUTER JOIN TABLEB b ON b.num=a.num WHERE date=month-01-year; How can you make month (append) - 01 - (append) year? and pass that as a condition to the field date? Is this possible?