May 11, 2015 at 10:14 am
What I really need is to find the entries that have the word LVAD but on either side there should be a space chartacters.
In other words I don't want to see the following coming from the query "SILVADENE ([PHI] SULFADIAZINE)"
How can we write this query to search only for any entry that has the word " LVAD " ?
Select top 100 * FROM tbl_abc
where
AIMS_Value like '%LVAD%'
May 11, 2015 at 10:17 am
a space in the LIKE is just as valid as any regular char.
change your like to have the spaces:
Select top 100 * FROM tbl_abc
where
--AIMS_Value like '%LVAD%' --old
AIMS_Value like '% LVAD %' --new
Lowell
May 11, 2015 at 1:24 pm
mw112009 (5/11/2015)
What I really need is to find the entries that have the word LVAD but on either side there should be a space chartacters.In other words I don't want to see the following coming from the query "SILVADENE ([PHI] SULFADIAZINE)"
How can we write this query to search only for any entry that has the word " LVAD " ?
Also be mindful of you square brackets in your data when using a LIKE statement. If you ever intend to search to include them in the future you'll need to escape the characters as they have a different meaning in a LIKE clause.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply