Multiple entries within a grid in a record can prevent a record from opening. A good example of this is multiple Town_Range_Section spatial attributes calculated for a given EO. How many is too many? Offhand, we don't know - this is something you may want to determine yourself if an EO is not opening. Following is an example that was recently encountered using just that example.


Given that Town_Range_Section spatial attributes are typically the most numerous, that is most likely the culprit. The following query will help you determine how many records are associated with a given EO within the EO_TRS table:

select eo_id, count(*) as quantity from eo_trs group by eo_id order by quantity desc;


A good start would be to remove EO_TRS records for which there are more than 5000 per EO. We would suggest removing all of the TRS entries for these EOs from both the SPATIAL_ATTRIBUTE and EO_TRS tables with the following SQL statements, run while logged into SQLPlus, Tora, Toad, or SQL Developer as the biotics_dlink user. Replace x, y, z, etc. with the applicable EO_IDs:


delete EO_TRS where EO_ID in (x, y, z);

delete SPATIAL_ATTRIBUTE where ATTRIBUTE_NAME='Town_Range_Section' and FEATURE_ID in (select shape_id from EO where EO_ID in (x,y,z); 


And to prevent the EO_TRS to be recalculated for these EOs again in the future, thereby reproducing the problem, mark the EO_TRS spatial attribute to not be recalculated for each of the EOs:

insert into SPATIAL_ATTRIBUTE (SPATIAL_ATTRIBUTE_ID, FEATURE_ID, ATTRIBUTE_NAME, ATTRIBUTE_VALUE, RECALCULATE) values(getnextseq('SPATIAL_ATTRIBUTE'), (SELECT SHAPE_ID FROM EO WHERE EO_ID=x), 'Town_Range_Section', 'Too many values', 'N'); 

insert into SPATIAL_ATTRIBUTE (SPATIAL_ATTRIBUTE_ID, FEATURE_ID, ATTRIBUTE_NAME, ATTRIBUTE_VALUE, RECALCULATE) values(getnextseq('SPATIAL_ATTRIBUTE'), (SELECT SHAPE_ID FROM EO WHERE EO_ID=y), 'Town_Range_Section', 'Too many values', 'N');

insert into SPATIAL_ATTRIBUTE (SPATIAL_ATTRIBUTE_ID, FEATURE_ID, ATTRIBUTE_NAME, ATTRIBUTE_VALUE, RECALCULATE) values(getnextseq('SPATIAL_ATTRIBUTE'), (SELECT SHAPE_ID FROM EO WHERE EO_ID=z), 'Town_Range_Section', 'Too many values', 'N');


And finally, commit the changes:

commit;