今天在预审完成时报如下错误,此错误原因是由于SQL Server数据字段存在小写,而Oracle数据库需大写导致的,
怎么解决这个问题了,非常简单 。这里将SQL贴出来 .
1.将生产型号中含有小写字母的查出来--只过滤硬板,FPC不包含在内
--将生产型号中含有小写字母的查出来--只过滤硬板,FPC不包含在内 SELECT * FROM mktxhglb WHERE pdctno LIKE ‘%[a-z]%‘ COLLATE chinese_prc_bin AND LEN(pdctno) = 10 SELECT * FROM mktdelivery WHERE pdctno LIKE ‘%[a-z]%‘ COLLATE chinese_prc_bin AND LEN(pdctno) = 10 SELECT * FROM mkthtpsb WHERE pdctno LIKE ‘%[a-z]%‘ COLLATE chinese_prc_bin AND LEN(pdctno) = 10 SELECT * FROM ppeecnxhb WHERE Newpdctno LIKE ‘%[a-z]%‘ COLLATE chinese_prc_bin AND LEN(Newpdctno) = 10 SELECT * FROM ppeecnxhb WHERE OldPdctNo LIKE ‘%[a-z]%‘ COLLATE chinese_prc_bin AND LEN(OldPdctNo) = 10
2.将生产型号中含有小写字母批量更新为大写--只过滤硬板,FPC不包含在内
--将生产型号中含有小写字母批量更新为大写--只过滤硬板,FPC不包含在内 update mktxhglb SET pdctno = UPPER(pdctno) WHERE pdctno LIKE ‘%[a-z]%‘ COLLATE chinese_prc_bin AND LEN(pdctno) = 10 update mktdelivery SET pdctno = UPPER(pdctno) WHERE pdctno LIKE ‘%[a-z]%‘ COLLATE chinese_prc_bin AND LEN(pdctno) = 10 update mkthtpsb SET pdctno = UPPER(pdctno) WHERE pdctno LIKE ‘%[a-z]%‘ COLLATE chinese_prc_bin AND LEN(pdctno) = 10 update ppeecnxhb SET Newpdctno = UPPER(Newpdctno) WHERE Newpdctno LIKE ‘%[a-z]%‘ COLLATE chinese_prc_bin AND LEN(Newpdctno) = 10 update ppeecnxhb SET OldPdctNo = UPPER(OldPdctNo) WHERE OldPdctNo LIKE ‘%[a-z]%‘ COLLATE chinese_prc_bin AND LEN(OldPdctNo) = 10
原文地址:https://www.cnblogs.com/pcbren/p/9571215.html
时间: 2024-10-12 10:07:11