1
表名:Table1
拆分表列SQL Server 2008中的值?
表有2列
Id Name
1 1|admin|[email protected]
2 22|user|[email protected]
從Name
專欄中,我要取的電子郵件地址
結果:
表名:Table1
拆分表列SQL Server 2008中的值?
表有2列
Id Name
1 1|admin|[email protected]
2 22|user|[email protected]
從Name
專欄中,我要取的電子郵件地址
結果:
試試這個
select SUBSTRING(name,CHARINDEX('|',name, CHARINDEX('|', name)+1)+1,100) from Table1
可能重複[T-SQL:與字符串連接相反 - 如何將字符串拆分爲多個記錄](http://support.microsoft.com/kb/314824/t-sql-opposite-to-string-concatenation-how -to-分裂串 - 到 - 多錄音功) – 2011-05-09 11:20:25