Re: [SQL] How to build this field

2001-03-08 Thread Christof Glaser
Josh, > > [ stuff deleted ] > > CREATE FUNCTION metakey (text, int4, int4) returns text as > > ' SELECT $1 || ' ' || text($2) || ' ' || text($3) ' > > LANGUAGE 'sql'; > > > > || is the "concatenate text" operator. > > > > Change the param types and cast them as you need. > > ... But keep in mind

Re: [SQL] How to build this field

2001-03-08 Thread Christof Glaser
Hi Juerg, > I need to build an additional field (metakey) out of three fields in > the table. > > SELECT a.a_kurzbez, a.a_ausgabenr, a.a_bundnr, a.a_nr, a.a_z_blaenge, > a.a_z_laenge, a.a_z_umfang FROM auftrag a > > should be changed to something like > > SELECT (a.a_kurzbez + a.a_ausgabenr + a.

[SQL] How to build this field

2001-03-08 Thread juerg . rietmann
Hi everybody I need to build an additional field (metakey) out of three fields in the table. SELECT a.a_kurzbez, a.a_ausgabenr, a.a_bundnr, a.a_nr, a.a_z_blaenge, a.a_z_laenge, a.a_z_umfang FROM auftrag a should be changed to something like SELECT (a.a_kurzbez + a.a_ausgabenr + a.a_bundnr) as