Parse #Hashtag Comments From SQL Server Record
问题 I am trying to pull all "#" comments from a text field in a SQL Server 2014 database. I am using the code I found on this MSDN thread to find multiple hashtags in one record and have modified it slightly to fit my needs, but I seeing some unexpected results in my result set. My T-SQL so far: IF OBJECT_ID('tempdb..#hashtag') IS NOT NULL DROP TABLE #hashtag; IF OBJECT_ID('tempdb..#numbers') IS NOT NULL DROP TABLE #numbers; IF OBJECT_ID('tempdb..#hashtagcounts') IS NOT NULL DROP TABLE