From: | palanivel(dot)kumaran(at)scandent(dot)com |
---|---|
To: | KÖPFERL Robert <robert(dot)koepferl(at)sonorys(dot)at> |
Cc: | pgsql-sql(at)postgresql(dot)org, pgsql-sql-owner(at)postgresql(dot)org |
Subject: | Re: Need clarification |
Date: | 2005-05-23 11:01:55 |
Message-ID: | OFC2828E29.23F9484C-ON6525700A.003C6F2F@scandentgroup.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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...
Thanks & Regards
Palanivel P.K
KÖPFERL Robert
<robert(dot)koepferl(at)so To: "'palanivel(dot)kumaran(at)scandent(dot)com'"
norys.at> <palanivel(dot)kumaran(at)scandent(dot)com>, pgsql-sql(at)postgresql(dot)org
Sent by: cc:
pgsql-sql-owner(at)pos Subject: Re: [SQL] Need clarification
tgresql.org
05/23/2005 04:34 PM
Your're looking for the interval data type.
timestamp - timestamp
or date - date can be compared with interval
CURRENT_TIMESTAMP - '4d'::interval => today - 4 days
|-----Original Message-----
|From: palanivel(dot)kumaran(at)scandent(dot)com
|[mailto:palanivel(dot)kumaran(at)scandent(dot)com]
|Sent: Montag, 23. Mai 2005 11:52
|To: pgsql-sql(at)postgresql(dot)org
|Subject: [SQL] Need clarification
|
|
|
|
|
|
|how can retrieve rows where the datedifference is more than 30...
|assume there exists a field named 'datacreated' which is of
|type 'date'. I
|need to compare it with the current date and need to extract
|the matched
|rows....
|
|thanks in advance.
|
|Palanivel
|
|Important Email Information :- The information in this email is
|confidential and may be legally privileged. It is
|intended solely for
|the addressee. Access to this email by anyone else is
|unauthorized. If
|you are not the intended recipient, any disclosure, copying,
|distribution or
|any action taken or omitted to be taken in reliance on it, is
|prohibited
|and may be unlawful. If you are not the intended addressee
|please contact
|the sender and dispose of this e-mail immediately.
|
|
|---------------------------(end of
|broadcast)---------------------------
|TIP 3: if posting/reading through Usenet, please send an appropriate
| subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
| message can get through to the mailing list cleanly
|
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly
Important Email Information :- The information in this email is
confidential and may be legally privileged. It is intended solely for
the addressee. Access to this email by anyone else is unauthorized. If
you are not the intended recipient, any disclosure, copying, distribution or
any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. If you are not the intended addressee please contact
the sender and dispose of this e-mail immediately.
From | Date | Subject | |
---|---|---|---|
Next Message | KÖPFERL Robert | 2005-05-23 11:04:30 | Re: Need clarification |
Previous Message | palanivel.kumaran | 2005-05-23 10:56:23 | need date clarification |