Find the space character in a string

How can I find the space character in a string ?
I tried this statement, but I always get 0 regadles of the value of myfield:
Select CHARINDEX(myfield,' ')
From mytable

Thanks,
LVL 4
marperAsked:
Who is Participating?
 
Aneesh RetnakaranDatabase AdministratorCommented:
Select CHARINDEX(' ', myfield)
From mytable
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.