SQL Like with double pipe concatenation
<p>I'm having a problem with a SQL query that must match the username of a user out of a column that contains all the users usernames.</p>

<p>So the column will contain something like:</p>

<pre><code>|USER1|USER2|USER3|USER11|USER22|
</code></pre>

<p>The user have pipes on the left and right to prevent "USER1" be matched even in "USER11".</p>

<p>My query is</p>

<pre><code>SELECT * FROM myTable WHERE CONCATUSERS LIKE ('%|' || 'USER1' || '|%')
</code></pre>

<p>Note that the USER1 in the query is a variable generated from our code so I must keep the concatenation syntax and I must use a standard syntax too (the code will run in mySQL, SQLServer etc..</p>

<p>So what is the correct way of concatenating strings in a LIKE clause?</p>