The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

My problem is that I have a column with file names including paths.
I want to select something from the table based on a Like 'very_long_path%'.
The problem is that I receive the error "the pattern is to long"

...and yet ANOTHER limit (of mine) led me to misunderstand your comment: that perhaps you were saying LEFT has a limit of its own. So I went and tested with the entire text of Jabberwocky. Not an entire loss, that effort... got to read a great poem again :)

While Breck's solution is a good one, there are two subtleties. First, Breck's rewrite is not sargable (the rewrite can't use an index whereas the LIKE pattern can). You can adjust the rewrite to make it sargable but the rewrite is complex depending on the collation used. The other subtlety is that Breck's rewrite doesn't precisely match LIKE. LIKE is processed by comparing character-by-character; full-strings are compared with '='. This can give different semantics with some collations (see http://dcx.sybase.com/index.html#1201en/dbreference/colc.html comparison with 'Æ'='AE' vs LIKE ).