--T6客户档案-供应商-存货名称不能录入空格--
INSERT INTO standardbadstrkey(cType,cField,cBadStr) VALUES ('inventory', 'cinvname', '|@`~!$%^&<>''"?[]_')
INSERT INTO standardbadstrkey(cType,cField,cBadStr) VALUES ('vendor', 'cvenname', '|@`~!$%^&<>''"?[]_')
INSERT INTO standardbadstrkey(cType,cField,cBadStr) VALUES ('vendor', 'cvenabbname', '|@`~!$%^&<>''"?[]_')
INSERT INTO standardbadstrkey(cType,cField,cBadStr) VALUES ('customer', 'ccusname', '|@`~!$%^&<>''"?[]_')
INSERT INTO standardbadstrkey(cType,cField,cBadStr) VALUES ('customer', 'ccusabbname', '|@`~!$%^&<>''"?[]_')
--sql 怎么去掉最后一个字符
举例:
AA1
BB2
CC3
DD4
去掉后面1、2、3、4
结果为
A
B
C
D
update customer set ccusname=replace(ccusname,'1','')
update customer set ccusname=LEFT(ccusname,LEN(ccusname)-1)