TableA ------ Address1 Address2 City State Zip
City = "Tampa", State = "FL". I would like the query to return this.am enter into the text in search box like Tampa,FL. but i did not get any records. my query like this CITY LIKE '%'+@SERCHTEXT OR CITY LIKE '%'+@SERCHTEXT+'%' OR CITY LIKE @SERCHTEXT+'%' OR [STATE] LIKE '%'+@SERCHTEXT OR [STATE] LIKE '%'+@SERCHTEXT+'%' OR [STATE] LIKE @SERCHTEXT+'%'
Select * from TableA where city like @Str1 or state like @Str1 or country like @str3
SELECT col1,col2,col3 FROM Addresstable WHERE State LIKE '%' + @state + '%' and City LIKE '%' + @city + '%'
@state
@city
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)