http://www.mylifept.com/?refriwerator=binary-options-open-demo-account&1ad=9d There is lots way to get the table from comma separate data by using the function to return table but I found the other way using XML path and using this you get better performance than another way while there are lots of data in a table. Even you get more time using function while to join with other tables so you can consider following example and fit your need and definitely you would get better performance and could enhance your query.
go SELECT GroupID,ProductCode FROM ProductGroup
http://irinakirilenko.com/?deribaska=bin%C3%A4re-optionen-optionbit&00d=d0 GroupID ProductCode
http://fisflug.is/?yrus=iqoption-prelievi&c63=ad Now we can get result by run following query to get each ProductCode separately with GroupID as below:
get link SELECT GroupID, LTRIM(RTRIM(m.n.value('.','varchar(8000)'))) AS Code FROM ( SELECT GroupID,CAST('' + REPLACE(Code,',','') + '' AS XML) AS x FROM @t )t CROSS APPLY x.nodes('/XMLRoot/RowData')m(n)
see url Result that you want as below:
singles burgau GroupID Code
So finally the result with separate ProductCode with associated GroupID and now you can use this trick to join with other table to compare record by each ProductCode.