日期:2014-05-17 浏览次数:20808 次
SELECT
CAST(S_TP2_Customer.CUST_NUMBER as Varchar(15)) as Cust,
S_TP2_Siebel.*,
S_TP2_CompanyInfo.COMPANY_NUMBER,
cast(NULLIF(
otranslate(
case
when position('!' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('@' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('#' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('$' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('%' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('^' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('&' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('*' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('(' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position(')' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('-' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('_' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('+' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('=' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('{' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('[' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('}' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position(']' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('|' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position('\' in S_TP2_CompanyInfo.COMPANY_NUMBER) > 0 then NULL
when position(':' in&nb