I have a non-spatial table with a subtype in an Oracle 18c 10.7.1 EGDB.
Using SQL, I want to select the following as columns in a query:
- Subtype Code
- Subtype Description
- A specific subtype field called
ACTIVITY
.- Of course, there are multiple fields in the table/subtype. But I only want to select the information for this specific field.
- And select the
ACTIVITY
field's domains (there is a different domain used for each subtype code).
The result would look like this:
SUBTYPE_CODE SUBTYPE_DESCRIPTION SUBTYPE_FIELD SUBTYPE_DOMAIN
------------ --------------------------------- ------------- ---------------
0 ACTIVE TRANSPORTATION ACTIVITY ACTIVITY_ATN
1 GEODETIC CONTROL SURVEY MONUMENT ACTIVITY ACTIVITY_GCSM
2 MUNICIPAL STRUCTURES (BRIDGES) ACTIVITY ACTIVITY_MS
3 ROADS ACTIVITY ACTIVITY_RD
4 STREETSCAPE & STREETLIGHTS ACTIVITY ACTIVITY_SS_SL
5 WATERCOURSE ACTIVITY ACTIVITY_WAT_RES
6 STORMWATER MANAGEMENT FACILITY ACTIVITY ACTIVITY_SWM_FACILITY
7 UNDERGROUND SERVICE ACTIVITY ACTIVITY_UND_SERV
8 BARRIER ACTIVITY ACTIVITY_BARRIER
9 WATER/WASTEWATER ACTIVITY ACTIVITY_WM_SAN
How can I select those subtype columns using SQL?
Note:
In hindsight, I realize that my terminology was misleading. When I said subtype field
, I meant the fields in the Default Values and Domains:
section:
I wasn't referring to the true Subtype Field
:
Apologies if that's confusing. There seem to be two different concepts of Subtype Fields
.