所以基本上我有一列多封电子邮件,其中一些是无效的,并且包含不允许的不同字符/回车。
以下是我如何在选择语句中查找无效电子邮件,但我不知道如何单独替换它们,例如,如果找到回车,我知道我会使用替换语句。与任何特殊字符相同。但这将涉及为每个可能的情况编写单独的查询?
基本上,我要求的是最有效的方法来遍历我的表,替换电子邮件地址中与这些案例语句之一匹配的任何字符
select /*+ parallel(a,12) full(a) */ a.row_id, a.par_row_id, a.attrib_01, a.created_by, a.last_upd_by from s_contact_xm a
where a.type = 'Email' and (a.attrib_01 IS NULL
or a.attrib_01 like '% %'
or a.attrib_01 like '%@%@%'
or a.attrib_01 like '%..%'
or a.attrib_01 like '%;%'
or a.attrib_01 like '%:%'
or attrib_01 not like '%@%'
or a.attrib_01 like '%/%'
or a.attrib_01 like '%\%'
or a.attrib_01 like '%|%'
or a.attrib_01 like '%@.%'
or a.attrib_01 like '%@'
or a.attrib_01 like '%.'
or a.attrib_01 like '%(%'
or a.attrib_01 like '%)%'
or a.attrib_01 like '%<%'
or a.attrib_01 like '%>%'
or a.attrib_01 like '%#%'
or a.attrib_01 like '%"%'
or a.attrib_01 like '%.@%'
or a.attrib_01 like '%..%'
or a.attrib_01 like '.%'
or a.attrib_01 IS NULL
or INSTR(a.attrib_01, CHR(13)) > '0'
or INSTR(a.attrib_01, CHR(10)) > '0') and a.created_by = ‘1-XAAX5P’