Updating Column value when another Column matches value from a list in SQL
<p>I have a table called ITEMSLIST</p>

<pre><code>ItemName    SourceID    Origin      Description
Item1       108         USA         Item of Importance
Item2       112         USA         Item of Importance
Item3       120         UK          Item of Importance
Item4       108         USA         Item of Importance
Item5       221         UK          Item of Importance
Item6       221         USA         Item of Importance
Item7       108         USA         Item of Importance
Item8       139         USA         Item of Importance
Item9       385         USA         Item of Importance
Item10      111         UK          Item of Importance
</code></pre>

<p>I'm trying to do the following:</p>

<p>If the SourceID matches an item from a very long list then the Origin needs to change from USA to UK. The list isn't from a table, it's just going to be a list of values</p>

<p>The shortened version of the list is 108, 221, 385</p>

<p>I've tried using a CASE WHEN EXISTS but can't quite get it to work as it should</p>

<pre><code>UPDATE ITEMSLIST
SET Origin = 'UK'
WHERE
    CASE
        WHEN EXISTS (SELECT *
            FROM ITEMSLIST
                WHERE a.SourceList = SourceID)
    END
FROM (VALUES
        ('108'),
        ('221'),            
        ('385')) a(SourceList)
</code></pre>