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?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
Select CHARINDEX(' ', myfield)
From mytable
0
All Courses

From novice to tech pro — start learning today.