title: Using IN operator with a variable in SAP HANA
body: <p>I am trying to use a variable as input for a <code>WHERE</code> condition having an <code>IN</code> clause using SAP HANA.</p>
  <p>For example:</p>
  <pre class="lang-sql prettyprint-override"><code>DO
  BEGIN
      DECLARE a VARCHAR(100) = '1000,1001';
      DECLARE b NVARCHAR(100) ARRAY = ARRAY('1000','1001');
      DECLARE c TABLE (valuelist NVARCHAR(100));
      --SELECT '1001' INTO valuelist FROM :c;
      --:c.INSERT('1001','1000');
      DECLARE e NVARCHAR(100) = ' ''1000'',''1001'' ';
      DECLARE f NVARCHAR(100) = '&quot;STATIONID&quot; IN (''1000'',''1001'')';
  
  select
      STATIONID
      
      from MY_TABLE
      
      where STATIONID IN ('1000','1001') -- working fine, but want to use a variable here
      -- where STATIONID IN (:a)
      -- where STATIONID IN (:b)
      -- where STATIONID IN :c
      -- where :f
      
      order by STATIONID;
  END
  </code></pre>
  <p>However, all my attempts, you can see some of them above, do fail when having multiple values in my condition. <code>STATIONID</code> really is a string field.</p>
  <p>Any hints on how to do this?</p>