title: Using like in Teradata for multiple values
body: <p>I have a requirement where I have to select multiple usernames from a table based on like condition.</p>
  
  <pre><code>UserName_Table:
  Username_column
  --------
  Nicky
  Nolan
  Megan
  Fox
  Federar
  Fager
  </code></pre>
  
  <p>Query will be:</p>
  
  <pre><code>Select Username_column 
  from UserName_Table 
  where Username_column like Any ('N%','Megan');
  </code></pre>
  
  <p>this will give the result:</p>
  
  <pre><code>Username_column
  --------
  Nicky
  Nolan
  Megan
  </code></pre>
  
  <p>Here comes the question: I want to put ('N%','Megan') in a table which will be populated from business users. Say table User_Filter.</p>
  
  <pre><code>User_Filter_Table:
  User_Filter_column
  -----------------
  N%
  Megan
  </code></pre>
  
  <p>I have changed my query as below to get the filter from table. </p>
  
  <pre><code>Select Username_column 
  from UserName_Table 
  where Username_column like Any (Select User_Filter_column from User_Filter_Table);
  </code></pre>
  
  <p>Weirdly this gives below result:</p>
  
  <pre><code>Username_column
  --------
  Megan
  </code></pre>
  
  <p>Why the query is skipping N%?</p>
  
  <p>Could anyone please help?</p>
  
  <p>Appreciate the help in Advance.</p>
  
  <p>Thanks
  Santhosh</p>