Use the Tracing Condition dialog box to define SQL statements that control the network tracing. SQL and data model knowledge is required.
Enter the statement directly or click Generate to generate a skeleton SQL query. Then, click Assistant to open the SQL Assistant.
Cost function—SQL statement that returns a number; it may return NULL if the cost does not apply. This is rated as zero costs.
Stop condition—SQL statement that returns NULL if the condition does not apply. Then, the feature is not a stop feature. If the condition returns any other number, the feature is a stop feature.
SQL Skeleton query |
Description |
Example: Utility tracing with stop condition |
case /* Point */ when &f_class_id=33 then ( select case /* Armature */ when f_class_id_attr=3 then ( select 1 from GA_ARMATURE where fid=ga_point.fid_attr and <CONDITION>) else null end from GA_POINT ga_point where fid=&fid) else null end |
Example: Non-utility tracing with stop condition: |
case /* <feature class> */ when &f_class_id=<id> then ( select 1 from <feature class> where fid=&fid and <CONDITION>) else null end |
<CONDITION> |
Placeholder used in a stop condition. Replace this value with the attribute that contains the information when you want to stop the tracing. Example: The attribute OPEN = YES indicates open armatures. case /* Point */ when &f_class_id=33 then ( select case /* Armature */ when f_class_id_attr=3 then ( select 1 from GA_ARMATURE where fid=ga_point.fid_attr and not OPEN = 'yes') else null end from GA_POINT ga_point where fid=&fid) else null end |
Example: Utility tracing with cost function |
case /* Point */ when &f_class_id=33 then ( select case /* Armature */ when f_class_id_attr=3 then ( select <VALUE> from GA_ARMATURE where fid=ga_point.fid_attr) else null end from GA_POINT ga_point where fid=&fid) else null end |
Example: Non-utility tracing with stop condition |
case /* <feature class> */ when &f_class_id=137 then nvl(( select <VALUE> from <feature class> where fid=&fid ),0) else 0 end |
<VALUE> |
Placeholder used in a cost function. Replace this value with the cost attribute to be minimized in the tracing. Example: PIPE_LENTH |
select 1 |
Helper select for a stop condition to get a return value that is not NULL if the conditions applies. |