Hi Steve,
If you are selecting a column that is not listed as a group by column, you need to use an aggregate function e.g. Max(). These are available from the Aggregates drop-down in the SQL Select Dialogue. However, using an aggregate on ObjectInfo(obj,2), which returns a Pen Style, is not realistic and generates an error. You might need to use StyleAttr to extract specific attributes from the Pen Style:
So the two changes you require are:
- Include col1 in your Select clause
- Use an aggregate plus StyleAttr for selecting the Pen Style attributes
E.g.
SELECT col1, Max(StyleAttr(ObjectInfo(obj,2), 5)) "Pen_Pattern_Index", Count(*) "RecCnt"
FROM FL_Legacy_Territory_DF
GROUP BY col1
------------------------------
James Nolet
GIS Manager
CAF Consulting
Melbourne office, VIC, Australia
------------------------------