Hi,
I had no try wheter this solves your problem, but have you conciddered using
an array or a self-written fcn which dicards your results
i.E. SELECT my_discard_but_last( q1(), q2(), q3());
or SELECT ARRAY[ q1(), q2(), q3() ];
or SELECT ROW(q1(), q2(), q3()) as my_tripel_type;
Have you
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
O [EMAIL PROTECTED] May 23, 2005 :
how can retrieve rows where the datedifference is more than 30...
more than 30 in what units?
years,days,milliseconds??
assume there exists a field named 'datacreated' which is of type 'date'. I
need to compare it with the current date and need to
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: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]
|Sent: Montag, 23. Mai 2005 11:52
|To:
am 23.05.2005, um 16:26:23 +0530 mailte [EMAIL PROTECTED] folgendes:
how can i extract the system date in postgress.
versand=# select now();
now
---
2005-05-23 13:26:13.353826+02
(1 Zeile)
versand=# select CURRENT_DATE;
date
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
am 23.05.2005, um 16:31:55 +0530 mailte [EMAIL PROTECTED] 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
Hi,
why does SELECT ARRAY(SELECT 1 WHERE FALSE) return NULL instead of
ARRAY[] resp. '{}'?
Markus
--
Markus Bertheau [EMAIL PROTECTED]
signature.asc
Description: This is a digitally signed message part
Markus Bertheau wrote:
Hi,
why does SELECT ARRAY(SELECT 1 WHERE FALSE) return NULL instead of
ARRAY[] resp. '{}'?
Markus
Perhaps Arrays always have to contain at least one element? (I don't
know for sure.)
SELECT array[];
ERROR: syntax error at or near ] at character 14
LINE 1: SELECT
Dnia 23-05-2005, pon o godzinie 18:54 +, Jan B. napisa(a):
Perhaps Arrays always have to contain at least one element? (I don't
know for sure.)
They can:
template1=# select '{}'::TEXT[];
text
--
{}
(1 )
I don't know, why the ARRAY[] syntax doesn't work for empty arrays.
Markus
Joe Conway [EMAIL PROTECTED] writes:
Markus Bertheau wrote:
why does SELECT ARRAY(SELECT 1 WHERE FALSE) return NULL instead of
ARRAY[] resp. '{}'?
Why would you expect an empty array instead of a NULL?
I think he's got a good point, actually. We document the ARRAY-with-
I am restructuring my DB schema and need help migrating data from 1
column of an existing table to two new tables. I have some Java code
that can do this for me, but it's very slow, and I am now hoping I can
migrate this data with some clever SQL instead.
Here are my 3 tables:
user_data
12 matches
Mail list logo