asked on
DECLARE @tbl TABLE (field VARCHAR(150))
insert INTO @tbl (field) VALUES ('account@bsigroup.com#mailto:account@bsigroup.com#')
SELECT field FROM @tbl t
UPDATE @tbl SET field = LEFT(field,CHARINDEX('#',field)-1)
SELECT field FROM @tbl t
Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.
TRUSTED BY
Open in new window
(Playing with using a variable instead of hard coding the string twice, but it isn't working yet, but thought I'd get this your way for starters)