select case when (select count(*) from system.nsuserauthority b where a.Client_No = b.OwnerID) = 0 then false else true end,a.Client_No,a.Client_Name from system.tClient_ID a where a.Client_Type = '3' and a.Client_Name like '%好%';select decode((select count(*) from system.nsuserauthority b where a.Client_No = b.OwnerID),0,false,true) as IsChoose,a.Client_No,a.Client_Name from system.tClient_ID a where a.Client_Type = '3' and a.Client_Name like '%好%';
我本来想转换一个count的结果为布尔型,结果如上述两种写法,都会出现问题,只能该做
select case when (select count(*) from system.nsuserauthority b where a.Client_No = b.OwnerID) = 1 then 'true' else 'false' end,
a.Client_No,a.Client_Name from system.tClient_ID a where a.Client_Type = '3' and 
a.Client_Name like '%好%';select decode((select count(*) from system.nsuserauthority b where a.Client_No = b.OwnerID),0,'false','true') as IsChoose,
a.Client_No,a.Client_Name from system.tClient_ID a where a.Client_Type = '3' and 
a.Client_Name like '%好%';才能运行成功,结果转换成了字符串了,高手来帮帮忙吧!