append fields for *where...*

From: Johnny C <juandelacruz(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: append fields for *where...*
Date: 2005-02-10 22:45:11
Message-ID: 2bffcc33050210144524608491@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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?

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bruno Wolff III 2005-02-10 23:12:50 Re: append fields for *where...*
Previous Message Joel Fradkin 2005-02-10 19:48:47 postgres 8 data directory other then default?