--========== -- up_chk_plan_itemid -- 功能: 检查方案信息中是否已关联项目ID --========== if exists (select * from sysobjects where name = 'up_chk_plan_itemid') drop proc up_chk_plan_itemid go
create proc up_chk_plan_itemid @p_ItemID varchar(10) -- 指令ID as set NoCount on set ArithAbort off set ArithIgnore on set Ansi_Warnings off
if exists(select PlanID from Plan698 where ItemIDList = @p_ItemID or ItemIDList like @p_ItemID + ',%' or ItemIDList like '%,' + @p_ItemID + ',%' or ItemIDList like '%,' + @p_ItemID) return 1 else return 0
----------------------------------------------
不要等到孤独寂寞时才想起朋友,不要等到穷困潦倒时才想起发奋,不要等到疾病缠身时才想起健康。。。