select
Result=case when ( select convert(varchar(1000), isnull(PathScript,'1=2'
)
)
from RE_Path
where FlowCode = @AuthID
)
then 1
else 0
end
from Table1
重排一下版面,这样看得比较清楚了。我看好象有语法错误。
Result=case when ( select convert(varchar(1000), isnull(PathScript,'1=2'
)
)
from RE_Path
where FlowCode = @AuthID
)
then 1
else 0
end
from Table1
重排一下版面,这样看得比较清楚了。我看好象有语法错误。
select Result=(case when exists(select convert(varchar(1000), isnull(PathScript,'1=2')) from RE_Path
where FlowCode = @AuthID)
then 1 else 0 end)
from Table1
To zheninchangjiang(john shu): convert(varchar(1000), isnull(PathScript,'1=2')) 不是没任何意义吗?
select
Result=case when ( select convert(varchar(1000), isnull(PathScript,'1=2'
)
)
from RE_Path
where FlowCode = @AuthID
)
then 1
else 0
end
from Table1
其中:
"select convert(varchar(1000), isnull(PathScript,'1=2'
)
)
from RE_Path
where FlowCode = @AuthID"
会得到一个表达式,如col1=col2 ,而Table1 中有列col1,col2,
所以是比较table1中col1,col2是否相等!再次谢谢两位仁兄!