Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: search string


Message #1 by "Fotopoulos, Lefteris" <LFot@e...> on Thu, 5 Apr 2001 12:49:15 +0300
OK, I have a query in a stored procedure like this:

SELECT *
FROM CITIES
WHERE CITY_NAME LIKE '%' + @playUn + '%'

It works fine, but if i pass a city name with a dash (e.g New-York), it
doesn't return any records. 

In other words if i do a select like:

SELECT *
FROM CITIES
WHERE CITY_NAME LIKE '%New-York%',  doesn't work.  (Table has 'New-York'
records.)

Why is this?

  Return to Index