SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
alter PROCEDURE [dbo].[TCCPAUsersAndNamesByJobPosition] @EmpOrfreeLance bit
AS
BEGIN
SET NOCOUNT ON;
SELECT distinct t1.UserId , tblCustomers.name
FROM tblTime t1
inner join tblCustomers on t1.UserId=tblCustomers.custID
where (t1.userid in (select distinct custID from tblCustomers where sectionCat Like '%,35%') )
AND (t1.UserId in (select distinct custID from tblCustomers where IsEmployee = @EmpOrfreeLance))
end
も試してみました IsEmployee = CONVERT(bit,@EmpOrfreeLance)
とSET @EmpOrfreeLance= CASE @EmpOrfreeLance WHEN 1 THEN 0 ELSE 0 END
何があっても同じ結果で同じリストを返します
シンプルじゃないですか???
IsEmployee
col-データ型は(bit,null)
私の開発用SQLサーバーは2008年です..オンラインサーバーは2005年です...