Yes, the address number and street name are in separate fields. But I want to keep my UI googlish with only 1 input box. I actually simplified the query for my post. I search for MBL, owner name, and address with 1 user text box. When the MBL, owner name, street number, and street name fields are all string, it works with this query:query.Where = String.Format("UPPER(MBLU) LIKE '%{0}%' OR UPPER(Owner) LIKE '%{0}%' OR UPPER(Co_owner) LIKE '%{0}%' OR CONCAT(Street_Number, CONCAT(' ', Street_Name)) LIKE '%{0}%'", SearchText.Text.ToUpper)
But one town I work with has a numeric field type for the street number. SO, I would like to do something like this:query.Where = String.Format("UPPER(MBLU) LIKE '%{0}%' OR UPPER(Owner) LIKE '%{0}%' OR UPPER(Co_owner) LIKE '%{0}%' OR CONCAT(CAST(Street_Number AS varchar()), CONCAT(' ', Street_Name)) LIKE '%{0}%'", SearchText.Text.ToUpper)
But CAST (or at least the varchar data type) doesn't seem to be supported by whatever version of SQL the REST API uses. Neither does CONVERT. The documentation doesn't go into any detail about what SQL statements are allowed. I just guessed about CONCAT and UPPER.It may be that, in order to keep my search UI to one text box to search all those fields, I will have to modify the table schema to make the street number field a string.