1

I've got a large file geodatabase that contains a polyline feature class of water-pipes. The feature class have many fields, but the ones that I'm interested in is that of the water-pipe's Length and Locality Name.

I'm looking for a way to use the Table Select tool to generate a summary table in the same file geodatabase which summarizes the water-pipe's shape lengths for each locality. The output should be file geodatabase table which looks like this example:

  1. Locality 1 24395.66118
  2. Locality 2 19572.35849
  3. Locality 3 17474.87241
  4. Locality 4 16205.04598
  5. etc...

I've tried to follow this link which describes the SQL syntax for such operation. I didn't get where to write it and how. This is the syntax I probably need from the link:

SELECT STATE_NAME, SUM(POP1990) as TotalPopulation
FROM counties
GROUP BY STATE_NAME ORDER BY STATE_NAME
4

You can use the Summary Statistics GP tool for that. Choose Shape_length field to be the Statistics field, and Locality Name field to be the case field.

  • This is a good answer but I'm looking for a way to do it by a SQL expression. How can I write a Stand-Alone SQL expression that will edit my data and will give me a new table? – EranGeo Nov 12 '15 at 10:38
  • 4
    You cannot do it with out-of-the-box tools for a file geodatabase (SELECT * FROM forms the first part of the SQL expression and is automatically supplied for you, you cannot change this). If you could load your data into a DBMS, then you would be able to execute this query. The page you refer to, is for file gdb API use (or in ArcObjects). – Alex Tereshenkov Nov 12 '15 at 10:59
  • 3
    The most important aspect of file geodatabases is that it doesn't have a database behind it. It doesn't support CREATE TABLE foo AS SELECT ... The canonical technique for creating a new summary table is to use Summary Statistics. – Vince Nov 12 '15 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.