Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 2097047654A for ; Tue, 10 Sep 2002 16:16:25 -0400 (EDT) Received: from ahmler4.mail.eds.com (ahmler4.mail.eds.com [192.85.154.77]) by postgresql.org (Postfix) with ESMTP id 5EF9947653B for ; Tue, 10 Sep 2002 16:16:24 -0400 (EDT) Received: from ahmlir1.mail.eds.com (ahmlir1-2.mail.eds.com [192.85.154.131]) by ahmler4.mail.eds.com (8.11.6/8.11.6) with ESMTP id g8AKGLa07713 for ; Tue, 10 Sep 2002 16:16:21 -0400 Received: from ahmlir1.mail.eds.com (localhost [127.0.0.1]) by ahmlir1.mail.eds.com (8.11.6/8.11.6) with ESMTP id g8AKGJ728819 for ; Tue, 10 Sep 2002 16:16:20 -0400 (EDT) Received: from usahm001.examhub.exch.eds.com (usahm001.examhub.exch.eds.com [207.37.138.140]) by ahmlir1.mail.eds.com (8.11.6/8.11.6) with ESMTP id g8AKGJV28799 for ; Tue, 10 Sep 2002 16:16:19 -0400 (EDT) Received: by usahm001.examhub.exch.eds.com with Internet Mail Service (5.5.2655.51) id ; Tue, 10 Sep 2002 16:16:16 -0400 Message-ID: <60D032C6B8E4D211B8A300805FEADEAA0D91F992@CAMKM201> From: "Del Mistro, Enzo" To: "'pgsql-sql@postgreSQL.org'" Subject: Year and month comparison Date: Tue, 10 Sep 2002 16:16:04 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2655.51) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/158 X-Sequence-Number: 9435 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 > >