select from one table with help of another table - Mailing list pgsql-novice

From
Subject select from one table with help of another table
Date
Msg-id 83202aff46a942fd922fdb7457442b37@lfv.se
Whole thread Raw
Responses Re: select from one table with help of another table  (Laurenz Albe <laurenz.albe@cybertec.at>)
Re: select from one table with help of another table  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-novice

Hi, list,

I’m trying to get the fid (integer) of objects in table line where the geometry (postgis) is inside another geometry from another table (polygon),

But I would not like to get the objects with the highest fid inside the polygons of table buffered.

I’ve tried this:

   SELECT fid FROM

      "line" USING “polugon” AS b WHERE

       ST_Contains(b.geom, "line".geom) AND "line".fid NOT IN (SELECT MAX("line".fid)

);

 

It complains about “USING” in line 2.

Anyone who knows how I should do it instead?

Kind regards,

Paul

pgsql-novice by date:

Previous
From: Manojkumar S
Date:
Subject: ".partial" WAL file missing while promoting database in streamingreplication.
Next
From: Laurenz Albe
Date:
Subject: Re: select from one table with help of another table