On 16/01/09 16:06, [email protected] wrote:
Hi,

db.select balks when the SELECT queries are sufficiently complex (experienced 
in GRASS6.3).

Example:

echo "SELECT county_id,county_name_ascii, max(area) INTO ovl_max FROM (SELECT county_id::integer,county_name_ascii,met_id,area FROM ovl_110 GROUP BY county_id,county_name_ascii,area,met_id ORDER BY county_name_ascii) FOO GROUP BY FOO.county_name_ascii,FOO.county_id;" | db.select

results in:
DBMI-Postgres driver error:
Cannot select:
SELECT county_id,county_name_ascii, max(area) INTO ovl_max FROM (SELECT 
county_id::integer,county_name_ascii,met_id,area FROM ovl_110 GROUP BY 
county_id,county_name_ascii,area,met_id ORDER BY county_name_ascii) FOO GROUP 
BY FOO.county_name_ascii,FOO.county_id;

Could this be because of the SELECT ... INTO which in my logic is a special case of the SELECT statement which would need to be executed via db.execute as db.select only handles "pure" selections, i.e. no modifications or creations ?

Moritz
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to