select distinctive nom_reg_12 from region_15,repartition whereby st_intersects(region_15.geom, (select geom indigenous repartition wherein id_espece="Tetrarti"))=true; however i get the following error :

More 보다 one row returned by a subquery offered as one expression

in the an initial time ns tried this and it job-related fine :

select distinctive nom_reg_12 indigenous region_15,repartition where st_intersects(region_15.geom,repartition.geom)=true;and then i tried this a component to obtain the geometry I desire :

select geom indigenous repartition where id_espece="Tetrarti"

You are watching: More than one row returned by a subquery used as an expression

postgresql error inquiry
improve this question
edited Jul 12 "17 at 13:55


31.6k33 yellow badges3030 silver badges6767 bronze title
request Jul 12 "17 in ~ 13:34

Mohamed Reda AguezzoulMohamed Reda Aguezzoul
8711 gold badge22 silver badges1212 bronze badges
include a comment |

1 prize 1

energetic oldest Votes
you deserve to move your condition outside the the subquery.ST_Intersects works on 1 row (for each geometry) in ~ a time, so if you usage a subquery it must likewise return just one row, and also you most likely have much more than 1 "Tetrarti" row

select distinctive nom_reg_12 indigenous region_15,repartition whereby id_espece="Tetrarti"and st_intersects(region_15.geom, repartition.geom)=true;
improve this answer
answered Jul 12 "17 at 14:01


31.6k33 gold badges3030 silver- badges6767 bronze title
add a comment |

your Answer

many thanks for contributing solution to geographical Information systems Stack Exchange!

Please be certain to answer the question. Administer details and also share her research!

But avoid

Asking because that help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.

To learn more, view our tips on writing an excellent answers.

Draft saved
Draft discarded

Sign up or log in in

authorize up using Google
authorize up using Facebook
sign up utilizing Email and also Password

Post together a guest

email Required, however never shown

Post together a guest


Required, however never shown

article Your answer Discard

By clicking “Post your Answer”, you agree to our terms of service, privacy policy and cookie plan

Not the answer you're spring for? Browse other questions tagged postgresql error request or ask your very own question.

The Overflow Blog
Featured top top Meta
Error inserting lot of rows in a table
changing Buffer table geometry dynamically in using plain SQL
get the lines between all point out of a polygon in : stop nested loop?
How have the right to I rate up a slow-moving Server 10.2 - PostgreSQL (9.2) ST_Intersects query?
exactly how to usage intersection in spatial guery in postgresql?
Editable views in - upgrade affects the wrong heat
Postgres update v ST_Union error: more than one row went back by a subquery provided as an expression
update + st_within
PostgreSQL include outcome of questions as column to table "ERROR: an ext than one row returned by a subquery used as an expression"
warm Network inquiries an ext hot inquiries

concern feed
subscribe to RSS
question feed To i ordered it to this RSS feed, copy and paste this URL into your RSS reader.


geographical Information equipment
stack Exchange Network
site architecture / logo © 2021 stack Exchange Inc; user contributions license is granted under cc by-sa. Rev2021.12.22.41046

See more: First Crota Teams Fallen Destiny 2, First Crota Team'S Fallen Destiny 2

Geographic details Systems stack Exchange works ideal with JavaScript allowed

her privacy

By clicking “Accept all cookies”, friend agree stack Exchange can store cookies on your device and disclose information in accordance v our Cookie Policy.