34,575
社区成员
发帖
与我相关
我的任务
分享
declare @priorrodno varchar(50)
declare @priorstate varchar(50)
select top 1 @priorrodno=rodno,@priorstate=state from PRO_Priorflow where flowprocess='脱气' and left(state,1)='P'
order by state
if (@@ROWCOUNT>0)
begin
if(@priorrodno in('A03P0058','A10R0078','A08R0107','A06P0040','A01P0317','A05R0126','A02P0308'))
begin
print 'a'
end
end
if (@@ROWCOUNT>0)
begin
if(@priorrodno in('A03P0058','A10R0078','A08R0107','A06P0040','A01P0317','A05R0126','A02P0308'))
begin
print 'a'
end
else
begin
print 'b'
end
end
else
begin
print '11'
end
这样写看看走到那个分支了
declare @dd varchar(32)='ds'
if @dd in('sasd','3sf','343','ds')
begin
print 1
end
else
begin
print 2
end
/*1*/