MY TSQL NOT WORKING...

  • Hi all

    DECLARE @SEARCH VARCHAR(50)

    SET @SEARCH = 'Alexan'

    IF (ISNUMERIC(@SEARCH) = 0)

    BEGIN

    SELECT * FROM INV_table WHERE AUTHOR LIKE CHAR(39)+'%'+@SEARCH+'%'+CHAR(39)) AS VARCHAR(100)

    END

    The like conditions is not working properly can you give me exact solutions

  • Why do you need CHAR(39) there, remove them and anyway there is an extra closing parenthesis at the end

    ---------------------------------------------------------------------------------

  • Thanks working fine,,,,,,,........

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply