I am new to the SQL realm and at work I use SQL Studio.
I have a question in regards to wildcards.
I am searching distinctly for a string value in a column.
I want to only look up patients by this specific string value.
It is this (verbatim): ‘LifeCare Amb MH’
the coding structure I use is:
select top 5*
from Integration.Encounter where [Facility] like ‘%LifeCare Amb MH%’
table - Integration.Encounter
column - Facility
string value - LifeCare Amb MH
SQL does not like that where statement line.
I believe it’s because of the spacing of the words when trying to use a wildcard.
How do I work with the spacing issue? It is a real string in a column. Just can’t seem how to get around the spacing issue.
All the help is greatly appreciated.
- This topic was modified 1 year, 4 months ago by Ctalley13.