Append pattern to a string in a table only for entries with a pattern
my problem is that i want to append "%@" to an attribute in an Oracle table only for entries with this pattern -> not "%@%"
With:
select t.* from myTable t where t.email not like '%@%';
I get the entries
Responses i.e.:
google.com
test.com
amazon.com
this should be replaced to
%@google.com
%@test开发者_如何学编程.com
%@amazon.com
Any ideas or hints?
Thx
Your UPDATE query would look this:
UPDATE myTable SET email="%@" || email WHERE email not like '%@%';
精彩评论