Thursday 15 May 2014

Where charindex not working in SQL Server -



Where charindex not working in SQL Server -

here query, returning 0 matches:

select * completeset charindex(completeset.problem,'aaa') > 0

i know have entries aaa in completeset.

i cannot figure out going on.

you've got backwards, characters you're looking first parameter:

select * completeset charindex('aaa',completeset.problem) > 0

per msdn link helpfully added in comments:

charindex ( expressiontofind ,expressiontosearch [ , start_location ] )

square brackets indicate optional parameters.

sql sql-server

No comments:

Post a Comment