On 01/31/2011 04:50 PM, Emi Lu wrote:
> Good morning,
>
> Is there an existing method to get days between two dates?
>
> For example,
>
> select '2010-01-01'::date - '1999-10-12'::date
>
> Returns how many days.
>
> Thank you,
>
> --
> Lu Ying
>
Hi !
Yes there is : date '2001-10-01' - date
That's precisely what I think..
:-|
- Original Message -
From: "Kenneth Marshall"
To: "Emi Lu"
Cc:
Sent: Monday, January 31, 2011 4:39 PM
Subject: Re: [SQL] Get days between two dates?
On Mon, Jan 31, 2011 at 10:50:43AM -0500, Emi Lu wrote:
Good morning,
Is there an existing me
Doesn't the SELECT you indicated do what you need?
Best,
Oliveiros
- Original Message -
From: "Emi Lu"
To:
Sent: Monday, January 31, 2011 3:50 PM
Subject: [SQL] Get days between two dates?
Good morning,
Is there an existing method to get days between two dates?
For example,
se
On Mon, Jan 31, 2011 at 10:50:43AM -0500, Emi Lu wrote:
> Good morning,
>
> Is there an existing method to get days between two dates?
>
> For example,
>
> select '2010-01-01'::date - '1999-10-12'::date
>
> Returns how many days.
>
> Thank you,
>
> --
> Lu Ying
>
Didn't you just answer your own qu
Ok, before 8.4, there I can use row_number().
For 8.3 + display tag + order by integer + paging based on pageBean
ArrayList alist;
In Bean.java, added:
private int rec_num;
in main .action java:
for(int i=0 ; i
Piotr Czekalski, 27.01.2011 16:21:
Gentelmen,
I follow this thread and I don't
On 01/31/2011 11:33 AM, Oliveiros d'Azevedo Cristina wrote:
Doesn't the SELECT you indicated do what you need?
Ok, I figured out:
age() + date_part(...) would be able to get it:
select date_part('day', age(date1::timestamp, date2::timestamp) )
--
Lu Ying
- Original Message - Fro
Good morning,
Is there an existing method to get days between two dates?
For example,
select '2010-01-01'::date - '1999-10-12'::date
Returns how many days.
Thank you,
--
Lu Ying
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.po
maybe custom types can be helpful. i use them when i have to many variables
or arrays.
On Mon, Jan 31, 2011 at 9:52 AM, Andreas Gaab wrote:
> Functions apparently cannot take setof arguments.
>
>
>
> Postgres 8.4:
>
>
>
> CREATE OR REPLACE FUNCTION testtable(IN setof anyarray)
>
> RETURNS anya
Andreas Gaab writes:
> Could not the function regexp_matches(text, text) be defined to only return a
> text[] not a setof text[]?
It'd be pretty hard to change at this point, because of
backwards-compatibility considerations, and because the two functions
share a single implementation.
As the subject implies, has this been fixed and is it in a currently
released GA build?
Best Regards
--
Michael Gould, Managing Partner
Intermodal Software Solutions, LLC
904.226.0978
904.592.5250 fax
Hi,
Could not the function regexp_matches(text, text) be defined to only return a
text[] not a setof text[]?
Because that is, what it actually does, or? For every input, it returns only
one output row. The function regexp_matches(text,text,text) in contrast really
can return multiple rows whil
Hello
use a array constructor instead
SELECT ARRAY(SELECT ...)
Regards
Pavel Stehule
2011/1/31 Andreas Gaab :
> Functions apparently cannot take setof arguments.
>
>
>
> Postgres 8.4:
>
>
>
> CREATE OR REPLACE FUNCTION testtable(IN setof anyarray)
>
> RETURNS anyarray AS
>
> $BODY$
>
> SELEC
Functions apparently cannot take setof arguments.
Postgres 8.4:
CREATE OR REPLACE FUNCTION testtable(IN setof anyarray)
RETURNS anyarray AS
$BODY$
SELECT $1 LIMIT 1;
$BODY$
LANGUAGE 'sql' STABLE;
-->
ERROR: functions cannot accept set arguments
Von: Viktor Bojović [mailto:viktor.bojo...@
13 matches
Mail list logo