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
tried it also with IsEmployee = CONVERT(bit,@EmpOrfreeLance)
and SET @EmpOrfreeLance= CASE @EmpOrfreeLance WHEN 1 THEN 0 ELSE 0 END
same all it retuns same list with same results no matter what
Shouldn't it be simple ???
IsEmployee col-datatype is (bit,null)
my dev SQL server is 2008 ..online server is 2005 should it be a matter ...
distinctkeyword for the select's inside inINas it will do nothing.