1.Replace的应用. ORACLE:rReplace := 'UPDATE CA_SYSRGT SET PARTID=REPLACE(PARTID,'''+strDept+''','''')';
PARTID为字段名称,strDept 为要查找的字符串,''''为要替换的字符串,本例子将strDept替换成空格
2。Case when 语句
UPDATE #SignDate SET StockPlanDate =( case when StockPlanDate='1900-01-01 00:00:00.000' then null 可按照上述UPDATE 语句更新数据库时间为空时的默认值:'1900-01-01 00:00:00.000' 为null |
1.Replace的应用. ORACLE:rReplace := UPDATE CA_SYSRGT SET PARTID=REPLACE(PARTID,+strDept+,); PARTID为字段名称,strDept 为要查找的字符串,为要替换的字符串,本例子将strDept替换成空格 最后执行语句便可以
打赏
-
支付宝扫一扫
-
微信扫一扫