From: Andreas Kretschmer <akretschmer@despammed.com>
To: pgsql-sql@postgresql.org
Subject: Re: [despammed] Re: Need clarification
Date: Mon, 23 May 2005 13:41:40 +0200
Message-ID: <20050523114140.GG15889@webserv.wug-glas.de> (raw)
In-Reply-To: <OFC2828E29.23F9484C-ON6525700A.003C6F2F@scandentgroup.com>
References: <OFC2828E29.23F9484C-ON6525700A.003C6F2F@scandentgroup.com>
am 23.05.2005, um 16:31:55 +0530 mailte palanivel.kumaran@scandent.com folgendes:
>
>
>
>
> Sorry, I didn't get ur point...please, tell me exact query to extract the
> rows from a table A which contains a date field named DTE whose difference
> is 30 days as compared to the current date...
test=# create table datediff (start date);
CREATE TABLE
test=# insert into datediff values ('1966/08/30');
INSERT 153382679 1
test=# insert into datediff values ('2005/05/23');
INSERT 153382680 1
test=# select * from datediff ;
start
------------
1966-08-30
2005-05-23
(2 Zeilen)
test=# select * from datediff where CURRENT_DATE - start > 10;
start
------------
1966-08-30
(1 Zeile)
test=# select * from datediff where CURRENT_DATE - start < 10;
start
------------
2005-05-23
(1 Zeile)
Btw.: please no TOFU, read http://en.wikipedia.org/wiki/TOFU
Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47212, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===
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: akretschmer@despammed.com
Subject: Re: [despammed] Re: Need clarification
In-Reply-To: <20050523114140.GG15889@webserv.wug-glas.de>
* 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