Wednesday, 5 February 2014

Fining all before a set char

Ever needed to find only the part of a fild before a set char.  Say just the name from an emails address? :-


SUBSTRING(Email,0, CHARINDEX('.',Email)) as Name