pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Johnny C <juandelacruz@gmail.com>
To: pgsql-sql@postgresql.org
Subject: append fields for *where...*
Date: Thu, 10 Feb 2005 17:45:11 -0500
Message-ID: <2bffcc33050210144524608491@mail.gmail.com> (raw)

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?



view thread (3+ messages)  latest in thread

Message-ID: <2bffcc33050210144524608491@mail.gmail.com>
Permalink:  ../2bffcc33050210144524608491@mail.gmail.com/
Also on:    postgresql.org/message-id/2bffcc33050210144524608491@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: juandelacruz@gmail.com
  Subject: Re: append fields for *where...*
  In-Reply-To: <2bffcc33050210144524608491@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox