有问题文章留言 看内容决定收费与免费
另外接收数据库质疑 勒索病毒数据恢复等项目。

3500盘点机与商云8软件对接时,盘点批号下传报错,入库,出库下传正常

【问】 3500盘点机与商云8软件对接时,盘点批号下传报错,入库,出库下传正常
【适用版本】5300盘点机 【模块】基础资料 【点击数】56
【知识编号】H2016052000013
【问题描述】 3500盘点机与商云8软件对接时,盘点批号下传报错,入库,出库下传正常

【答】 该问题是由于商品档案中的含有全半角和其他符号导致盘点机读取格式异常,请备份数据库后执行以下语句后测试use hbposv8
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

赞(0)
未经允许不得转载:思迅软件知识库 » 3500盘点机与商云8软件对接时,盘点批号下传报错,入库,出库下传正常

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址