Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search for a dash
Message
 
To
17/07/2014 14:27:09
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01603942
Message ID:
01603944
Views:
53
>But, if I have this:
>
>
>DECLARE @Title Varchar(50)
>
>SET @Title='Michel F-%'
>
>SELECT Client.Numero FROM Client WHERE Client.Title LIKE @Title
>
>
>...it will not find anything, even if I have some title starting with Michel F-ournier, for example.
>
>I assume there is a conversion that has to be done on such special character.

That works for me just fine. You sure your data doesn't have a hyphen instead of a dash?

45 is a dash
173 is a hyphen

Also, you can save a line by doing DECLARE @Title Varchar(50) = 'Michael F-%'
Brandon Harker
Sebae Data Solutions
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform