[SQL] how to have 2 select creteria on one column?

2005-09-10 Thread Michael Hoeller
Hello, I would like to select every row which has got in the column CODE a "k" but I want to exclude every "kV" -- may be it is due to the fact that it is Saturday and I work too long I don't get it.. I tried a subselect, union but I struggle with the two select creteria on one column. Can s

[SQL] Fwd: how to have 2 select creteria on one column? SOLVED

2005-09-10 Thread Michael Hoeller
Hello, sometime you have to write a mail and your brain gets cleared... select a.code from stamm a where a.skart in ( (select skart from stamm where code like '%k%') ) and a.code not like '%V%'; May be this is not nice but this brings back the list I have.

[SQL] how to update with a join?

2005-09-10 Thread Michael Hoeller
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 h