why t-sql pathindex not work with declared variable?

Posted by mmtemporary on Stack Overflow See other posts from Stack Overflow or by mmtemporary
Published on 2010-05-25T09:34:09Z Indexed on 2010/05/25 9:41 UTC
Read the original article Hit count: 236

Filed under:

why this query is not work correctly?

declare @s nvarchar
set @s = 'abcd'
select patindex('%b%', @s)

it is return zero.

© Stack Overflow or respective owner

Related posts about tsql