title: Subquery returned more than 1 value - STIntersects
body: <p>I have three tables</p>
  
  <ul>
  <li>2x tables of observational point data with a point geom column (for different time periods)</li>
  <li>A table of hexbins across the study area, with a polygon geom column</li>
  </ul>
  
  <p>Both are in the same coordinate system.<br>
  The points tables are always intersecting the hexbin table.  i.e. no points outside the hexbin layer.</p>
  
  <p>Running the following query:</p>
  
  <pre><code>UPDATE OBS_MONDAY
  SET GRID_ID = (
      SELECT GRID_ID
          FROM SYDHEX s with (index(FDO_Shape))
      WHERE (OBS_MONDAY.Shape.STIntersects(s.Shape) = 1))
  </code></pre>
  
  <p>This executes fine, and calculates the GRID ID field from the Hexbin layer into a column in the Point layer.</p>
  
  <p>However, running this same query against the 2nd point table causes an error:</p>
  
  <p><em>Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, &lt;, &lt;= , >, >= or when the subquery is used as an expression.</em></p>
  
  <p>Can someone help me pinpoint the problem here please.</p>
  
  <p><a href="https://i.stack.imgur.com/ERaap.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ERaap.png" alt="enter image description here"></a></p>