Restrict a character limit array in LIKE

1

I have a question about LIKE of T-SQL. Is it possible to restrict by a number of equal characters to check how many addresses start the same and may end up different? More or less like this:

Where Endereco LIKE '[array10caracteres]%'

My goal is to get a result more or less where a person's address is:

  

Commander Street lined N 10
  Street Commander Linen LT 8 QD 150

The idea is for these two to appear with a count or something like

    
asked by anonymous 25.11.2014 / 12:29

1 answer

4

You can restrict the value you use to the left of LIKE :

WHERE LEFT(Endereco, 10) LIKE ...
    
25.11.2014 / 12:34