title: POSTGIS: ERROR: Operation on mixed SRID geometries. Trying to find overlapping geoms with two different SRIDS/tables
body: <p>POSTGIS_VERSION=2.1;</p>
  
  <p>I have two tables with two different SRID. My objective is to show which geoms from TABLE_B intersect with a region from TABLE_A.</p>
  
  <pre><code>SELECT tablebname, a.geom FROM TABLE_B as a INNER JOIN (SELECT geom FROM TABLE_A WHERE tableAID = '00001') as b ON ST_Intersects(a.geom, b.geom);
  </code></pre>
  
  <p>My table structure (truncated) is as follows</p>
  
  <p>TABLE_A<br>
  text tableAid<br>
  geometry geom  (SRID=3577)<br></p>
  
  <p>TABLE_B<br>
  text tableBid<br>
  geometry geom  (SRID=4326)<br></p>
  
  <p>I have tried transforming the geoms with ST_TRANSFORM(geom, 3577) but I still get the same error "ERROR: Operation on mixed SRID geometries."</p>
  
  <p>Using the following command <br>
  <code>select distinct(ST_SRID(geom)) as srid, count(*) from tableA group by srid;</code></p>
  
  <p>I get the following</p>
  
  <pre><code>srid | count
  3566 | 2196
       |   18
  </code></pre>
  
  <p>My attempts at changing the last 18 to 3577 are futile. Each time I update the SRID it says it succeeded or did not find any SRID &lt;> 3577.</p>
  
  <p>Any help would be appriciated. I can provided more details in required. Thanks.</p>