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
share
improve this question
follow
edited Jul 12 "17 at 13:55

*

JGH
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
1
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;
share
improve this answer
follow
answered Jul 12 "17 at 14:01

*

JGHJGH
31.6k33 gold badges3030 silver- badges6767 bronze title
5
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
submit

Post together a guest


surname
email Required, however never shown


Post together a guest


surname
email

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
Linked
1
Error inserting lot of rows in a table
connected
8
changing Buffer table geometry dynamically in Postdiscoverhotmail.com using plain SQL
4
get the lines between all point out of a polygon in Postdiscoverhotmail.com : stop nested loop?
1
How have the right to I rate up a slow-moving Arcdiscoverhotmail.com Server 10.2 - PostgreSQL (9.2) ST_Intersects query?
0
exactly how to usage intersection in spatial guery in postgresql?
4
Editable views in Qdiscoverhotmail.com - upgrade affects the wrong heat
1
Postgres update v ST_Union error: more than one row went back by a subquery provided as an expression
1
update + st_within
0
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.


*

lang-sql
geographical Information equipment
firm
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.