title: How to pass multiple values to UPDATE or SELECT COUNT(*) statement
body: <p>I am trying to do a update a record.</p>
  
  <p>Table name is customer</p>
  
  <pre><code>id | name    | address         | state
  ---+---------+------------+-------------------------
   1 |    John | 123 main st     | TX
   2 |    Jack | 678 John st     | NJ
   3 |    Bet  | 987 Tx st        | NY
   4 |    Maddy| 9812 Hudson st | CA
   5 |    ABCD | 9813 Mainly st  | PA
  
  </code></pre>
  
  <p>My query is like below </p>
  
  <pre><code>UPDATE CUSTOMER c SET c.state = 'CA' WHERE c.id IN (idList);
  </code></pre>
  
  <p>Where idList is a localVariable that I created and it returns a list of id like 1,3,5</p>
  
  <p>The query is working if do it like </p>
  
  <pre><code>UPDATE CUSTOMER c SET c.state = 'CA' WHERE c.id IN (1,3,5);
  </code></pre>
  
  <p>It is updating the respective records to CA.</p>
  
  <p>But if I use it as </p>
  
  <pre><code>UPDATE CUSTOMER c SET c.state = 'CA' WHERE c.id IN (idList);
  </code></pre>
  
  <p>I get the below error. I don't want to pass the list directly as the list might change. I am getting the list of ids using a different command where it returns and assigns to idList as 1,3,5</p>
  
  <p>Error:</p>
  
  <blockquote>
    <p>ORA-01722: invalid number<br>
    ORA-06512: at line 35<br>
    01722. 00000 -  "invalid number"**</p>
  </blockquote>
  
  <p>How to solve this? I am writing it as a stored procedure.</p>