Year and month comparison - Mailing list pgsql-sql

From Del Mistro, Enzo
Subject Year and month comparison
Date
Msg-id 60D032C6B8E4D211B8A300805FEADEAA0D91F992@CAMKM201
Whole thread Raw
List pgsql-sql
Hi all,

I am trying to perform a Year and Month comparison from a date field.
Within oracle this is working, however within the Postgresql environment I
am getting an error.

I currently have a call as follows:

select descr
and (to_char(subsc_paid_to_dt,'YYYYMM') < to_char(current_date,'YYYYMM') 
(so this is performing a comparison by year and month, not by actual day of
the month)

Any suggestions?

Thanks & regards,    Enzo
Enzo  Del Mistro   * 
33 Yonge St, Suite 500,  *  Toronto,  ON
Phone: 001 416 814 1741
E-Mail: enzo.delmistro@eds.com
> Business Acceleration Services TOR, 
> Solutions Consulting
> 
> 


pgsql-sql by date:

Previous
From: "Goran Buzic"
Date:
Subject: Re: POSIX-style regular expressions
Next
From: Mark Worsdall
Date:
Subject: Do the datatypes have set id/oid that are constant?