From: | Bruno Boettcher <bboett(at)erm1(dot)u-strasbg(dot)fr> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | search and replace possible on SQL? |
Date: | 2000-11-16 15:21:03 |
Message-ID: | 20001116162103.S22005@erm1.u-strasbg.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
hello,
again fiddling around with SQL...
wanted to loop over the Base search for Strings beginning with a
sequence and replace that sequence with another one.....
tryed the following:
update journal set description='Add '||(select id description from
journal subq where subq.description like '%PSF%').description where id=
subq.id;
but evidently it didn't parsed :D
so the questions are:
can i make somehow a subquery and reuse the colums ? the system tryed
above doesnt seem satisfying .....
is there a way to achieve above functionality, or do i have to write a
frontend to make this?
in fact what i want to do using perl syntax:
$temp="Add ".$1 if /(PSF.*)$/;
--
ciao bboett
==============================================================
bboett(at)earthling(dot)net
http://inforezo.u-strasbg.fr/~bboett http://erm1.u-strasbg.fr/~bboett
===============================================================
the total amount of intelligence on earth is constant.
human population is growing....
From | Date | Subject | |
---|---|---|---|
Next Message | Jens Hartwig | 2000-11-16 15:27:33 | Re: search and replace possible on SQL? |
Previous Message | turing2000 | 2000-11-16 11:05:51 |