not \"%@%\"" />
开发者

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 '%@%';
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜