In response to Jayadevan M :
Hi,
I don't think so.
Oracle -
SQL select count(*) over () as ROWCOUNT , first_name from people;
ROWCOUNT FIRST_NAME
--
-
---
6 Mary
In response to Nilesh Govindarajan :
Hi,
I want to find out the userid, nodecount and comment count of the userid.
I'm going wrong somewhere.
Check my SQL Code-
Check my example:
test=*# select * from u;
id
1
2
3
(3 rows)
test=*# select * from n;
uid
-
1
1
1
Hi,
It works, but you should use a recent version:
test=*# select count(1) over (), i from foo;
count | i
---+
8 | 1
8 | 2
8 | 3
8 | 6
8 | 7
8 | 9
8 | 13
8 | 14
(8 rows)
test=*# select version();
Jayadevan M, 26.03.2010 07:56:
Thank you for setting that right. Apologies for not checking version.
The orginal poster stated that he is using 8.4, so that solution will work for
him.
Thomas
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your
On 2010-03-25, Leif Biberg Kristensen l...@solumslekt.org wrote:
I'm struggling with how to make plpgsql iterate through a list of numbers
input as a text string, eg. 1438 2656 973 4208. I figure that I can use the
regexp_split_to_array() function to make an array of the string, but can I
Sergey Konoplev pisze:
On 25 March 2010 12:25, Ireneusz Pluta ipl...@wp.pl wrote:
Hello,
is there any standard function, or a concise solution based on set of them,
returning a set of dates included in a week of given year and week number?
I ended up with creating my own function as in the
CREATE OR REPLACE FUNCTION your_week2date(double precision, double
precision) RETURNS SETOF date
AS
$_$
SELECT day
FROM (
SELECT (
date_trunc('week', ($1::text||'-01-01')::date)
+ ($2::text||' week')::interval
+ ( d::text||' day')::interval
Sergey Konoplev pisze:
CREATE OR REPLACE FUNCTION your_week2date(double precision, double
precision) RETURNS SETOF date
AS
$_$
SELECT day
FROM (
SELECT (
date_trunc('week', ($1::text||'-01-01')::date)
+ ($2::text||' week')::interval
+ ( d::text||'