[Qgis-user] PostGIS query running in 1.7.4 but not 1.9
James Stott
James.Stott at npaconsult.co.uk
Fri Apr 27 02:51:53 PDT 2012
Hi Salvatore,
I think that has just appeared from my editing the table names for including the query in this email.
DB manager will execute the query and give me the results in the Result section, it just won't add it to the map in 1.9. It will add it to the map in 1.7.4. If I save the project in 1.7.4 with the query in it, it will not open in 1.9.
I think I have worked it out. The query returns the same polygon multiple times, and as such the gid column isn’t unique for each record. I guess I just need to only return each polygon once for QGIS to be able to use the query layer.
James
James Stott BSc (Hons) MSc | Senior Professional
Nicholas Pearson Associates | 30 Brock Street | Bath | BA1 2LN
T: 01225 445548 | M: -
http://www.npaconsult.co.uk/
-----Original Message-----
From: qgis-user-bounces at lists.osgeo.org [mailto:qgis-user-bounces at lists.osgeo.org] On Behalf Of Salvatore Larosa
Sent: 27 April 2012 10:38
To: qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] PostGIS query running in 1.7.4 but not 1.9
Il giorno ven, 27/04/2012 alle 10.28 +0100, James Stott ha scritto:
> I am trying to run a query in QGIS. The query below works in QGIS 1.7.4
> but I cannot get it to open in 1.9 (Windows 7).
>
> SELECT "units"."gid", "units"."name", "pipe"."section",
> "units"."the_geom"
> FROM "data"."units", "data"." pipe"
> WHERE " pipe"."section" = 'W' and ST_DWithin("pipe"."the_geom",
> "units"."the_geom", 500);
>
> Does anyone know what I am doing wrong?
Hi James,
I see a blank space in name table (pipe) in clause FROM:
FROM "data"."units", "data"." pipe"
Could be the problem there?
Regards,
-SL
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
http://www.npaconsult.co.uk/http://www.npaconsult.co.uk/about-news.asp
http://www.npaconsult.co.uk/terms.asp
This Electronic Transmission is intended only for the attention of the addressee. It may contain privileged and confidential information. If you are not the person for whom it is intended, you must not copy, distribute or take any action in reliance on it. If you have received this electronic transmission in error please notify us immediately by telephone, delete the transmission and destroy any hard copies.
Nicholas Pearson Associates has used all reasonable efforts to ensure that this message and any attachments are free from viruses.
Nicholas Pearson Associates, 30 Brock Street, Bath, BA1 2LN , Tel: +44 (0) 01225 445548, Fax: +44 (0) 01225 312387, Website: http://www.npaconsult.co.uk/
More information about the Qgis-user
mailing list