Page 10 of 10 FirstFirst ... 8910
Results 91 to 98 of 98

Thread: Do you use SQL queries to build your model or analyse your simulation results?

  1. #91

    Join Date
    May 2018
    Posts
    10
    Is there a possibility to set the manhole floor level X below the lowest connected invert? That would be great!

  2. #92
    Forum Moderator

    Innovyze Employee



    Join Date
    Feb 2013
    Posts
    133
    Quote Originally Posted by Lydia FRC View Post
    I’m working on a project looking at the risk to buildings from flooding and I'm wanting to display 2D results based on categories of risk of damage to buildings which are functions of depth and velocity. The result categories I’m wanting to show are:
    No damage: V<2m/s OR D*V<3m2/s
    Partial damage: V>2m/s AND 3m2/s<D*V<7 m2/s
    Destroyed: V>2m/s AND D*V>7 m2/s
    Is there any way to use an SQL to define a theme for these results categories?
    You should be able to do this with a nested IIF statement. Essentially you would have the following ranges:-

    Range 1: V<2m/s OR D*V<3m2/s
    Range 2: Partial damage: V>2m/s AND 3m2/s<D*V<7 m2/s
    Range 3: Destroyed: V>2m/s AND D*V>7 m2/s

    IIF(Range 1, No Damage, IIF(Range 2, Partial Damage, IIF(Range 3, Destroyed, Other)))

    Each range would need to be defined in the IIF statement.

  3. #93
    Is there an SQL term that gives the genuine subcatchment (polygon) area? I am trying to write an audit SQL that identifies all subcatchments where the total runoff area is greater than the total subcatchment area, but I want to use the genuine area of the subcatchment - not the value which has been entered in the "total area" field (which may not equal the actual area)? So something along the lines of:

    CLEAR SELECTION;
    Subcatchment.area < area_absolute_1 + area_absolute_2 + ... + area_absolute_12

    As an unrelated second query, I am also trying to write an SQL to identify all objects in the model which contain a specific flag - "OP" (optioneering). So far, I have:

    CLEAR SELECTION;
    SELECT FROM [All Nodes] WHERE flags.value="OP";
    SELECT FROM [All Links] WHERE flags.value="OP";
    SELECT FROM [Subcatchment] WHERE flags.value="OP"

    For the rest of the object types, would I have to add new lines for each object type? Or are there any other group terms available, along the lines of [All Polygons], [All Lines] or even simply [All Objects]?
    Last edited by Jason_Kulsdom; September 3, 2018 at 07:33 AM. Reason: second query added

  4. #94

    Join Date
    May 2018
    Posts
    10
    Does anyone use a query to set the manhole floor elevations by means of its connecting conduit? If so, I'd be very interested. Thanks!

  5. #95
    Quote Originally Posted by SWinters View Post
    Does anyone use a query to set the manhole floor elevations by means of its connecting conduit? If so, I'd be very interested. Thanks!
    In ICM, CS or InfoNet if you set the chamber floor level flag to Default, the chamber floor level will become the lowest invert level connected to the manhole.

  6. #96
    Quote Originally Posted by SWinters View Post
    Does anyone use a query to set the manhole floor elevations by means of its connecting conduit? If so, I'd be very interested. Thanks!
    Quote Originally Posted by boiermoflea View Post
    In ICM, CS or InfoNet if you set the chamber floor level flag to Default, the chamber floor level will become the lowest invert level connected to the manhole.
    I know that there is a quirk with ICM, whereby if you select a few pipes and use the inference to interpolate invert levels, but at the same time you do not select the intermediate nodes, then the chamber floor level of those nodes will not be updated based on the connected pipe invert levels, despite them still being flagged #D. This issue can be avoided by making sure you include all intermediate nodes before using the inference. Or it can be resolved by changing the chamber floor flags away #D, then back to #D. Or just be validating the model, at which point all fields flagged #D will re-calculate themselves.

  7. #97
    Quote Originally Posted by SWinters View Post
    Does anyone use a query to set the manhole floor elevations by means of its connecting conduit? If so, I'd be very interested. Thanks!
    set chamber_floor =iif (MIN (us_links.ds_invert) > MIN(ds_links.us_invert),MIN (ds_links.us_invert),MIN (us_links.ds_invert))
    make sure you select the Apply Filter to current selection and select the manholes you want to apply sql previously.

  8. #98

    Join Date
    Nov 2018
    Posts
    1
    Hi,
    Is there an SQL query to split a long conduit by adding nodes with equal intervals?
    Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •