Reputation: 350
I want to get specific part from the emailid as like below example:
Example [email protected]
I want email id portion start strong text ing with @ as like below
@xxxxx.com
I tried to do the same with the SURSTR() function in oracle. I just want to identify the emailid like
@xxxxx.com
and want to update it like
@yyyyy.com using oracle.
Can any one help me here?
Upvotes: 0
Views: 44
Reputation: 4985
This should work:
update your_table
set email_add = substr(email_add, 0, instr(email_add, '@')) || 'yyyy.com'
For example, using dual:
select substr('[email protected]', 0, instr('[email protected]', '@')) || 'gmail.com' from dual
gives [email protected]
Upvotes: 1