ALTER FUNCTION [dbo].[cycleplan_doctor_view]
(@Parameter1 INTEGER, @Group VARCHAR(MAX))
RETURNS TABLE
AS
RETURN
(SELECT *
FROM tbl_master_doctor
WHERE int_doctor_id IN (SELECT int_doctor_id
FROM tbl_master_MR
WHERE int_user_id = @Parameter1
AND @Group = 'Yes')
)
When I am passing a value for @Group
, I am getting empty table. But when I replace the value of @Group
with its value it is working correctly.
I think I am missing some basic thing here.