I want to create a SQL Server stored procedure like this:
CREATE PROCEDURE dbo.uspGetCharacterID
(@characterName vchar(1000))
as
SELECT c.charatcer_full
FROM CHARACTER c (nolock)
WHERE character_full IN (@characterName)
ORDER BY C.characterID
From code, @charactername I am passing --> 'Batman in latest movies', 'Superman in latest movies'
But in code its returning zero rows.
NOTE: if I run the same select query in SQL with those string, it successfully returns two rows.
QUESTION: which datatype should be used, so that requirement is satisfied?
'Varchar' and 'Text' didn't work.
Please guide
Thanks
varcharand then used those in a.. IN (....)construct. Doesn't work that way. See this other SO question that deals with this issue, and see the answer provided byKM.- that's the way to do it