title: Informix - update SET column with results from a subselect
body: <p>I have a table with a collection column. I want to do a subselect which returns several integers and put the result in that collection column, however I can't find a syntax to do it through SQL. I did it by writing an SQL procedure which does the same thing (put results of SELECT in SET variable and return variable), however I'm trying to do the same without functions. Can it be done?</p>
  
  <p>First, I create a temporary table:</p>
  
  <pre><code>CREATE TEMP TABLE table1 (
    id INTEGER
  , col2 SET(INT NOT NULL)
  )
  </code></pre>
  
  <p>Then I fill it with test data:</p>
  
  <pre><code>INSERT INTO table1 (id) VALUES (1);
  INSERT INTO table1 (id) VALUES (2);
  </code></pre>
  
  <p>And now this works:</p>
  
  <pre><code>UPDATE table1 SET col2 = SET{1,2};
  </code></pre>
  
  <p>...but I'm trying to do this and it doesn't work:</p>
  
  <pre><code>UPDATE table1 SET col2 = (SELECT id FROM table1) WHERE id = 1;
  </code></pre>
  
  <p>It returns this error:</p>
  
  <pre><code>[Error Code: -9632, SQL State: IX000]  Value does not match the type of column (col2).
  </code></pre>