Re: [GENERAL] merge result sets

2006-06-21 Thread simon
On Mit, 2006-06-21 at 14:16 +0200, Martijn van Oosterhout wrote: > On Wed, Jun 21, 2006 at 02:08:29PM +0200, simon wrote: > > > The aggregate stuff should work. something like: > > > > > > SET kategorie = (SELECT comma_aggregate(kategorie_bezeichnung) FROM ...) > > > > > > should do the trick. >

Re: [GENERAL] merge result sets

2006-06-21 Thread Martijn van Oosterhout
On Wed, Jun 21, 2006 at 02:08:29PM +0200, simon wrote: > > The aggregate stuff should work. something like: > > > > SET kategorie = (SELECT comma_aggregate(kategorie_bezeichnung) FROM ...) > > > > should do the trick. > i just found > > CREATE FUNCTION comma_aggregate(text,text) RETURNS text AS

Re: [GENERAL] merge result sets

2006-06-21 Thread simon
On Mit, 2006-06-21 at 12:34 +0200, Martijn van Oosterhout wrote: > On Wed, Jun 21, 2006 at 12:23:44PM +0200, simon wrote: > > or in other words, i just would like to know how to rewrite > > > > SET kategorie = array_to_string ((SELECT ARRAY (SELECT > > kategorie_bezeichnung > > > > so it works i

Re: [GENERAL] merge result sets

2006-06-21 Thread Martijn van Oosterhout
On Wed, Jun 21, 2006 at 12:23:44PM +0200, simon wrote: > or in other words, i just would like to know how to rewrite > > SET kategorie = array_to_string ((SELECT ARRAY (SELECT > kategorie_bezeichnung > > so it works in psql7.3 as well. The aggregate stuff should work. something like: SET kateg

Re: [GENERAL] merge result sets

2006-06-21 Thread simon
On Mit, 2006-06-21 at 00:09 +0200, simon wrote: > On Die, 2006-06-20 at 15:34 -0500, Bruno Wolff III wrote: > > On Tue, Jun 20, 2006 at 12:06:24 +0200, > > simon <[EMAIL PROTECTED]> wrote: > > > hi all > > > > > > i'm using postgres 7.3 > > > > > > my problem is i want to build a helper table:

Re: [GENERAL] merge result sets

2006-06-20 Thread simon
On Die, 2006-06-20 at 15:34 -0500, Bruno Wolff III wrote: > On Tue, Jun 20, 2006 at 12:06:24 +0200, > simon <[EMAIL PROTECTED]> wrote: > > hi all > > > > i'm using postgres 7.3 > > > > my problem is i want to build a helper table: > > > > UPDATE studienmodul_summary > >SET kat

Re: [GENERAL] merge result sets

2006-06-20 Thread Bruno Wolff III
On Tue, Jun 20, 2006 at 12:06:24 +0200, simon <[EMAIL PROTECTED]> wrote: > hi all > > i'm using postgres 7.3 > > my problem is i want to build a helper table: > > UPDATE studienmodul_summary >SET kategorie = (SELECT kategorie_bezeichnung > > if the SELECT gives back just one

[GENERAL] merge result sets

2006-06-20 Thread simon
hi all i'm using postgres 7.3 my problem is i want to build a helper table: UPDATE studienmodul_summary SET kategorie = (SELECT kategorie_bezeichnung if the SELECT gives back just one result row, everthing is easy. my problem is, there is sometimes more than one result row. is