SDO_GTYPE count and group by based on tables in all_tab_cols?
From: <petersnep_at_gmail.com>
Date: Fri, 24 Jan 2014 07:28:30 -0800 (PST)
Message-ID: <e7f1f135-b105-40e4-8147-e594a904a004_at_googlegroups.com>
Hello all,
Date: Fri, 24 Jan 2014 07:28:30 -0800 (PST)
Message-ID: <e7f1f135-b105-40e4-8147-e594a904a004_at_googlegroups.com>
Hello all,
I've got the following query:
SELECT GEO.GEOMETRY.SDO_GTYPE "TYPE GEOMETRY", COUNT(*) FROM SCHEMA.TREES GEO GROUP BY GEO.GEOMETRY.SDO_GTYPE;
Now, I want to do this to every table where the column GEOMETRY exists:
SELECT TABLE_NAME FROM ALL_TAB_COLS WHERE COLUMN_NAME = 'GEOMETRY' AND OWNER = 'SCHEMA';
This will result in the following:
TABLE_NAME
TREES
GREENPATCHES
Now, I can't seem to find out how I can run the first query depending on what I get in the second query. Can anyone help me with this?
Thanks in advance,
Peter Received on Fri Jan 24 2014 - 16:28:30 CET