[GRASS-user] RE: Problem querying layers other than '1' in gi s.m
epatton at nrcan.gc.ca
Mon Sep 25 10:35:54 EDT 2006
>Eric, the way that i usually approach this type of problem in GRASS is
>1. store my attribute data in a RDBMS such as mysql, postgresql, sqlite,
>2. create some vector data with at least two columns: 'cat' and 'id'
>'cat' is used by v.db.connect to associate a row with a vector feature
>'id' is used to associate other attribute data with a row
>3. create a new, composite table (from two existing tables 'vector'
>and 'data') with something like:
>create table new_table as
>select vector.cat, vector.id, data.time, data.temp
>from vector, data
>where vector.id = data.id ;
>4. then hookup new_table to the original vector file with v.db.connect
Thanks, Dylan. Your SQL code worked and I now have a single table that
combines the fields of interest from both tables. However....
Any attempt to edit the field names or types result in the error "Error
editing field. Message from database engine: near ".": syntax error". I
should note that as a result of the SQL join of the two tables, the field
names are really long now:
Could the error I'm getting be caused by the length of the new field names?
Soils and Biogeochemistry Graduate Group
University of California at Davis
More information about the grass-user