tsql using like with wildcard and trailing space? -


I can not find such a statement to work with space and to work behind the wildcard, my query is as follows:

Select * From the table where the field is delimited as 'desc_%'

data, Desc Top, Desc down and so on. The query uses the 'Desc_%' pattern, but when I use the pattern 'Desc%' the field is nervous (255).

Any thoughts?

Edit

The data was tab-delimited and when I copied a value from the 2008 management studio, then the tab was converted to space. Dumb mistake I was like [] tip, so I answered the answer. Thanks to everyone, I must remember that the grid should not rely on copy from the results.

brackets' [& amp; ']' To set up a single-character class for the match. In your case, the SQL should look like this: "Select from the table * Select where the field 'disk []%'"

Edit: Add sample, link

  Insert the #findtest (mytext varchar (200)) #findtest VALUES ('Desc r') to select #findtest VALUES ('Descr') from #findtest * Select where 'desc []%' drop table #findtest (1 line S) Affected (see 1 article affected) mytext -------- Desc r (1 line affected)  


Comments