Domain list SQL

Hello guys,

I have to tables in oracle Building and Status.

CREATE TABLE building

(

  build_name             VARCHAR2(255) NOT NULL,

  status_id            NUMBER NOT NULL,

  mapid                  NUMBER

);

CREATE TABLE STATUS

(

  id             NUMBER NOT NULL,

  status_name  VARCHAR2(60) NOT NULL,

);

Here is my SQL:

select distinct status_id as mat from building, status where status_id=id order by status_id

Where should I put this sql query to get the status_ID into Combo Box, as an possibility to change status when placing feature building?

When I registrer database feature Building in GSA project, I  can see that property Status_id has Text property type. 

Should I create ComboBox in Operations-Properties-Add ComboBox property  and then add my SQL into Domain List SQL.?

But what about status_id that have a Text property? Am I doing something wrong her?

Parents
  • You need to place a foreign key constraint on the status_id in the status table referring to the status_id in the Building table. This will have 2 affects.
     
    First it will pull the status table as a domain list during the register process, and second it will relate this table then to the building table, thus automagically generating the combobox and referencing the domain list.
     
    This is spelled out in the Bentley Map help file:
     

    Do a search on : Oracle Spatial for Bentley Map Domain Lists

     
     
    Jerry Walter
    Geospatial Advisor
    Mapping - US and Canada
    +1 937 205 3674 (office)
    +1 937 205 3674 (mobile)
    Skype : jerry.walter.troy
     

     

Reply
  • You need to place a foreign key constraint on the status_id in the status table referring to the status_id in the Building table. This will have 2 affects.
     
    First it will pull the status table as a domain list during the register process, and second it will relate this table then to the building table, thus automagically generating the combobox and referencing the domain list.
     
    This is spelled out in the Bentley Map help file:
     

    Do a search on : Oracle Spatial for Bentley Map Domain Lists

     
     
    Jerry Walter
    Geospatial Advisor
    Mapping - US and Canada
    +1 937 205 3674 (office)
    +1 937 205 3674 (mobile)
    Skype : jerry.walter.troy
     

     

Children
No Data