mysql存储过程中定义变量提示语法错误,来高手帮看下,在线等待。。。。。。
declare@Nodebigint,@Personnelbigint,@Permissionsbigint,@LuggageIDbigint,@LuggageTypeb...
declare @Node bigint,@Personnel bigint,@Permissions bigint,@LuggageID bigint,@LuggageType bigint,@TargetSite bigint,@TheirCarID bigint,@SourceSite bigint,@SupercargoID bigint,@TransactorID bigint,@MyPersonnelID bigint,@TheirRecordID bigint
set @Node=concat(select ID from datadictionary where Content=MyNode); /*根据网点名称查询*/
set @Personnel=concat(select ID from personnelinformation where StaffName=MyPersonnel); /*根据姓名查询*/
set @Permissions=concat(select ID from datadictionary where Content=MyPermission); /*根据权限查询*/
set @Luggage=concat(select ID from luggageinformation where RFID=(select ID from rfiddictionary CardID=Myluggage)); 展开
set @Node=concat(select ID from datadictionary where Content=MyNode); /*根据网点名称查询*/
set @Personnel=concat(select ID from personnelinformation where StaffName=MyPersonnel); /*根据姓名查询*/
set @Permissions=concat(select ID from datadictionary where Content=MyPermission); /*根据权限查询*/
set @Luggage=concat(select ID from luggageinformation where RFID=(select ID from rfiddictionary CardID=Myluggage)); 展开
展开全部
你把代码贴出来啊!
追问
我叉叉这个网页,他妹的,代码太多了,贴不出来。。
declare @Node bigint,@Personnel bigint,@Permissions bigint,@LuggageID bigint,@LuggageType bigint,@TargetSite bigint,@TheirCarID bigint,@SourceSite bigint,@SupercargoID bigint,@TransactorID bigint,@MyPersonnelID bigint,@TheirRecordID bigint
老是报这点错误。
追答
应该是这样写的吧
不是定义变数错了,应该是对变数的赋值有问题
declare @Node bigint,@Personnel bigint,@Permissions bigint,@LuggageID bigint,@LuggageType bigint,@TargetSite bigint,@TheirCarID bigint,@SourceSite bigint,@SupercargoID bigint,@TransactorID bigint,@MyPersonnelID bigint,@TheirRecordID bigint
declare @Luggage bigint
select @Node=ID from datadictionary where Content=MyNode
select @Personnel=ID from personnelinformation where StaffName=MyPersonnel
select @Permissions=ID from datadictionary where Content=MyPermission
select @Luggage=ID from luggageinformation where RFID in (select ID from rfiddictionary where CardID=Myluggage)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询