how to update with a join?

Поиск
Список
Период
Сортировка
От Michael Hoeller
Тема how to update with a join?
Дата
Msg-id 200509101847.48765.MichaelHoeller@t-online.de
обсуждение исходный текст
Ответы Re: how to update with a join?  (MichaelHoeller@t-online.de)
Список pgsql-sql
Hello 

I like to delete "k" from a string with the statement 
update stamm set code = replace (code, 'k' , '');

But the only way to get the canditates I want to update is the following 
statement. It seems that I can not update when I do a join. 

Is there a way around it? With google I found a hint that a subselect
could help but there was no exsample ... And I did not found out how 
to do this.

select a.code 
from stamm a 
where 
a.skart in ( (select skart from stamm where code like '%k%') ) 
and a.code not like '%V%';

I would be happy about a hint.

Thanks a lot 
Michael


В списке pgsql-sql по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: how to have 2 select creteria on one column?
Следующее
От: Michael Hoeller
Дата:
Сообщение: Fwd: how to have 2 select creteria on one column? SOLVED