【问】 3500盘点机与商云8软件对接时,盘点批号下传报错,入库,出库下传正常 | ||
【适用版本】5300盘点机 | 【模块】基础资料 | 【点击数】56 |
【知识编号】H2016052000013 | ||
【问题描述】 3500盘点机与商云8软件对接时,盘点批号下传报错,入库,出库下传正常 |
go
update t_bd_item_info set item_name=left(item_name,len(item_name)-1)where ascii(right(item_name,1))=45
go
update t_bd_item_info
set item_name = replace(replace(item_name,char(10),”),char(13),”)
where charindex(char(10),item_name) > 0 or charindex(char(13),item_name) > 0
gocreate function u_convert( @str nvarchar(4000), –要转换的字符串 @flag bit –转换标志,0转换成半角,1转换成全角
)
returns nvarchar(4000)
AS
begin
declare
@pat nvarchar(8),
@step int,
@i int,
@spc int
if @flag=0
begin
select @pat=N’%[!-~]%’,@step=-65248, @str=replace(@str,N’ ’,N’ ‘)
end
else
begin
select @pat=N’%[!-~]%’,@step=65248,@str=replace(@str,N’ ‘,N’ ’)
end
set @i=patindex(@pat collate LATIN1_GENERAL_BIN,@str)
while @i>0
select@str=replace(@str,substring(@str,@i,1),nchar(unicode(substring(@str,@i,1))+@step)),@i=patindex(@pat collate LATIN1_GENERAL_BIN,@str)
return(@str)
end
go
update t_bd_item_info set item_name=dbo.u_convert(item_name,0)
go UPDATE t_bd_item_info SET item_name = replace(item_name,’"’,”)
godrop function dbo.u_convert
go