How to find int values from a comma separated varchar column SQL
<p>I have 3 tables. Transactions, LineItems which is a child of the Transactions table, and Rejections</p>

<p>Currently in the lineitems table there is a column called rejectioncodes, which contains the id values of the rejection table but in a string value, separated by commas. </p>

<p><a href="https://i.stack.imgur.com/NIRl8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NIRl8.png" alt="enter image description here"></a></p>

<p>How would I be able to select a row where the id is in that varchar? </p>

<p>My code sample so far</p>

<pre><code>select transactions.fTransactionID 
from Transactions inner join
     LineItems
     on transactions.fTransactionID = lineitems.fTransactionID 
where fTransactionStatusID = 11 and
      LineItems.fRejectionCodes in (select fRejectionCodeID
                                    from RejectionCodes 
                                    where fRejectionCodeID in (1,7,8,9,12,13,15)
                                   _
</code></pre>

<p>Of course my query will say it can't be done due to the column being a varchar</p>