Hi Christina,
Quoting Oliveiros Cristina [EMAIL PROTECTED]:
Hello , All.
I am not sure if this is the right mailing list to place this question.
If it doesn't, please kindly redirect me to the right list.
I have a giant table with about 10,6 million records.
Queries on it are usually
Hi all,
I was wondering if there is a way to concatenate the results of a field in a
select to return it as a single string.
Example :
my_field
--
1
2
3
select concat_something(my_field) from my_table group by something;
the result expected would be someting like that : 1/2/3 (with
any explanations ?
On Fri, Aug 22, 2008 at 6:07 PM, Julien Cigar [EMAIL PROTECTED] wrote:
array_accum ?
On Fri, 2008-08-22 at 15:40 +0200, Nacef LABIDI wrote:
Hi all,
I was wondering if there is a way to concatenate the results of a
field in a select to return it as a single string.
array_accum ?
On Fri, 2008-08-22 at 15:40 +0200, Nacef LABIDI wrote:
Hi all,
I was wondering if there is a way to concatenate the results of a
field in a select to return it as a single string.
Example :
my_field
--
1
2
3
select concat_something(my_field) from
Nacef LABIDI a écrit :
Hi all,
I was wondering if there is a way to concatenate the results of a field
in a select to return it as a single string.
Example :
my_field
--
1
2
3
select concat_something(my_field) from my_table group by something;
the result expected
Thank you, this is all what I need
On Fri, Aug 22, 2008 at 4:10 PM, Guillaume Lelarge
[EMAIL PROTECTED]wrote:
Nacef LABIDI a écrit :
Hi all,
I was wondering if there is a way to concatenate the results of a field
in a select to return it as a single string.
Example :
my_field
Also, the array_accum aggregate isn't present by default, you need to
create it with :
CREATE AGGREGATE array_accum (anyelement)
(
sfunc = array_append,
stype = anyarray,
initcond = '{}'
);
On Fri, 2008-08-22 at 18:24 +0200, Julien Cigar wrote:
of course:
of course: http://rafb.net/p/EOaYfO59.html
Julien
On Fri, 2008-08-22 at 15:58 +0200, Nacef LABIDI wrote:
any explanations ?
On Fri, Aug 22, 2008 at 6:07 PM, Julien Cigar [EMAIL PROTECTED]
wrote:
array_accum ?
On Fri, 2008-08-22 at 15:40 +0200, Nacef
Hi all,
I was wondering if there is a way to concatenate the
results of a field in a
select to return it as a single string.
Example :
my_field
--
1
2
3
select concat_something(my_field) from my_table group by
something;
the result expected would be someting like
All was well with the code below, apologies to all who read my previous
email. The error (an oversight) was on my part. In the CREATE FUNCTION
... statement I had FLOAT as the return type instead of INTEGER.
Now the function runs smoothly. Preliminary results show it is orders of
magnitude
Good morning,
Just notice one small thing, and need your information about select
select col1, col2
from table1
left join table2
using (col1, col2)
;
This query never complain about ambiguous columns of col1 and col2 in
the select part.
My guess is:
(1) col1, col2 always return
Just a guess, but it seems to me that since the join is using col1 and col2
there is no ambiguity. They should be the same no matter which table it
comes from.
Edward W. Rouse
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Emi Lu
Sent: Friday, August
Hi Edward,
Just a guess, but it seems to me that since the join is using col1 and col2
there is no ambiguity. They should be the same no matter which table it
comes from.
Not always the same; Left join may return:
table2.col1,col2 = null,
while table1.col1,col2 is not null
-Original
Hi Luigi,
you will have problems if table 1 and table 2 have the same names to col1 e
col2. For example, table1 has col1=parcel and col2=area and table 2 has
col1=country and col2=area then, in that case you will have ambiguity.
Would you please give me an example?
I have two tables like the
On Fri, 2008-08-22 at 17:10 -0400, Emi Lu wrote:
Would you please give me an example?
I have two tables like the following:
T1 (col1 varchar, col2 varchar, primary key (col1, col2))
T2 (col1 varchar, col2 varchar, primary key (col1, col2))
Query I have is:
===
Emi Lu [EMAIL PROTECTED] writes:
Just notice one small thing, and need your information about select
select col1, col2
from table1
left join table2
using (col1, col2)
;
This query never complain about ambiguous columns of col1 and col2 in
the select part.
That's because you used USING,
Sorry for the fairly long post.
I'm having a big problem trying to update one table from another in
PostgreSQL 8.3.1.
I have a lookup table called termgroup:
# select * from termgroup;
termgroupname | mindays | maxdays
---+-+-
1-30 days | 1 | 30
31-59
On Fri, 22 Aug 2008, Steve Johnson wrote:
update certgroups
set termgroupname = tg.termgroupname
from certgroups c, termgroup tg
where (c.days = tg.mindays) and (c.days = tg.maxdays);
In recent PostgreSQL versions I believe this is properly written:
update certgroups c
set termgroupname =
Stephan Szabo [EMAIL PROTECTED] writes:
On Fri, 22 Aug 2008, Steve Johnson wrote:
update certgroups
set termgroupname = tg.termgroupname
from certgroups c, termgroup tg
where (c.days = tg.mindays) and (c.days = tg.maxdays);
In recent PostgreSQL versions I believe this is properly written:
19 matches
Mail list logo