declare @typeId as nvarchar(50)
set @typeId = (select typeId from ptype zl where not exists( select 1 from T_JXC_PtypeUNIT dw WHERE zl.typeId=DW.ptypeId))
declare @Barcode as nvarchar(50)
set @Barcode = (select Barcode from ptype zl where not exists( select 1 from T_JXC_PtypeUNIT dw WHERE zl.typeId=DW.ptypeId))
declare @TradePrice1 as numeric(18, 4)
set @TradePrice1 = (select preprice1 from ptype zl where not exists( select 1 from T_JXC_PtypeUNIT dw WHERE zl.typeId=DW.ptypeId))
declare @TradePrice3 as numeric(18, 4)
set @TradePrice3 = (select preprice3 from ptype zl where not exists( select 1 from T_JXC_PtypeUNIT dw WHERE zl.typeId=DW.ptypeId))
declare @RetailPrice as numeric(18, 4)
set @RetailPrice = (select preprice4 from ptype zl where not exists( select 1 from T_JXC_PtypeUNIT dw WHERE zl.typeId=DW.ptypeId))
declare @UnitRate as numeric(18, 8)
set @UnitRate = (select UnitRate1 from ptype zl where not exists( select 1 from T_JXC_PtypeUNIT dw WHERE zl.typeId=DW.ptypeId))
insert into
T_Jxc_PtypeUnit(PtypeId,nUnit,UnitName,UnitRate,TradePrice1,TradePrice3,RetailPrice,BarCode)
values(@typeId,1,'个',1,@TradePrice1,@TradePrice3,@RetailPrice,@Barcode),
(@typeId,2,'箱',@UnitRate,'','','',''),
(@typeId,3,'',1,'','','','') 消息 512,级别 16,状态 1,第 2 行
子查询返回的值不止一个。当子查询跟随在 =、!=、<、<=、>、>= 之后,或子查询用作表达式时,这种情况是不允许的。
消息 512,级别 16,状态 1,第 5 行
子查询返回的值不止一个。当子查询跟随在 =、!=、<、<=、>、>= 之后,或子查询用作表达式时,这种情况是不允许的。
消息 512,级别 16,状态 1,第 8 行
子查询返回的值不止一个。当子查询跟随在 =、!=、<、<=、>、>= 之后,或子查询用作表达式时,这种情况是不允许的。
消息 512,级别 16,状态 1,第 11 行
子查询返回的值不止一个。当子查询跟随在 =、!=、<、<=、>、>= 之后,或子查询用作表达式时,这种情况是不允许的。
消息 512,级别 16,状态 1,第 14 行
子查询返回的值不止一个。当子查询跟随在 =、!=、<、<=、>、>= 之后,或子查询用作表达式时,这种情况是不允许的。
消息 512,级别 16,状态 1,第 17 行
子查询返回的值不止一个。当子查询跟随在 =、!=、<、<=、>、>= 之后,或子查询用作表达式时,这种情况是不允许的。
消息 8114,级别 16,状态 5,第 19 行
从数据类型 varchar 转换为 numeric 时出错。
|