How to select rows from a table based on a column value in another table that has multiple values?
<p>I have two tables. </p>

<p><strong>User</strong> with columns UserId, Area</p>

<p>The <code>Area</code> column is populated with multiple comma separated values (from listbox) - data looks like this:</p>

<pre><code>User1 KA,TN,AP,GJ
User2 MH,UP,MP,GJ
</code></pre>

<p><strong>Order</strong> with columns OrderID, ProductID, Qty, Area</p>

<p>Data looks like this:</p>

<pre><code>1 Prod1 10 GJ
2 Prod1 22 MH
3 Prod2 3  AP
4 Prod2 77 TN
</code></pre>

<p>How to select rows from <code>Order</code> table based on <code>User</code> table?</p>

<p>Say logged in user is <code>User1</code>. His areas are <code>KA,TN,AP,GJ</code>.</p>

<p>The result should look like this:</p>

<pre><code>Prod1 10 GJ
Prod2 77 TN
</code></pre>

<p>Please advise on the SQL query to get this result.</p>

<p>Thanks and regards
Krishna</p>