Extracting of each characters from a given enum separated by comma

Viewed 25
CREATE FUNCTION [dbo].[EnumValidation]
(
@P_TeiValue NVARCHAR(5),
@P_Input NVARCHAR(255)
)
RETURNS NVARCHAR(MAX)
BEGIN
    DECLARE @Enum_Value NVARCHAR(255)
    DECLARE @V_Results VARCHAR(255)
    SET @Enum_Value = (select Enumeration_Values from Demo where tei=@P_TeiValue);

i want to check here if input value is same as any character from the enum value. could you help me on this? GO

I get a,s,d,o,p as output

I need to check if @P_Input = any of these value(a,s,d,o,p) then it shall return true.

0 Answers
Related