I am having trouble rendering the following PostGIS query in qgis1.803.
SELECT
s.musym,
st_intersection(s.the_geom,f.the_geom) as geo,
nextval('"soilsplittersequence"'::regclass) as k
From public."SoilsSpatial" as s JOIN public."Fields" as f
ON ST_Intersects(s.the_geom, f.the_geom)
where f."FarmNumber"=37
When I run this query in the db manager module it returns 500 ish results, but I can't display it. I also can't display this query if I use it to create a view in my postgis database.
The only way I can get it to display is if I make the query into a create table.
I'm assuming that the problem is related to my use of a sequence to generate a unique id. The reason that I'm using this technique is that there is a many to many relationship between the two tables.
Thanks for the advice.