Monday, October 22, 2012

SQL - Return Left of String from Specified Char


DECLARE @somestring as nvarchar(50) = 'test,value';


select left(@somestring,CHARINDEX(',',@somestring)-1)

No comments:

Post a Comment