December 13, 2010 at 12:46 am
((@VarEmp_Id=0) or (@VarEmp_Id is null)or (Employee.Emp_Id=@VarEmp_Id)) And
(Emp_Name=Case @VarEmp_Name is not null Then @VarEmp_Name Else Emp_Name)And
((@VarEmp_Surename='') or (@VarEmp_Surename is null)Or freetext(Emp_Surename,@VarEmp_Surename ))And
i wrote this tsql line , in second line , about Emp_Name,
something is wrong, and that is a syntax error , that is about
is not null
or
Incorrect syntax near '@VarEmp_Id'.
would you please help me?
December 13, 2010 at 2:00 am
This should do:
(Emp_Name=Case when @VarEmp_Name is not null Then @VarEmp_Name Else Emp_Name end)And
Hope this helps,
Gianluca
-- Gianluca Sartori
December 14, 2010 at 3:34 am
U missed an 'END' for case in second line.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply