Where Condition Views - Intergraph Smart Materials - Version 10.1 - Administration & Configuration - Hexagon

Intergraph Smart Materials Classic Administration (10.1)

Language
English
Product
Intergraph Smart Materials
Subproduct
Classic
Search by Category
Administration & Configuration
Smart Materials/Smart Reference Data Version
10.1

After entering the necessary data for your where condition, you must save it to the database.

Now you can click the button to generate the database view. For complex definitions, this may take a long time. All views created on the A.60.06 screen using the Generate View button will be named MV_WHERE_ followed by a sequential number. You can drop the view using the button, but it’s generally not required since regeneration will automatically drop the view.

If the view is not generated or not valid, the where condition will not function. You may view the validity of the view in the first block on A.60.06 in the View Status field. Any change to the where condition will make the view invalid. To validate it, it must be regenerated.

You should then check the generated SQL command text for any errors encountered. Click the button to open a new window displaying the SQL text of the view.

Use the scrollbar on the left to view the following sections of the view. Use the button to close this window.

If the generation succeeded, you can click the button to have the software count the number of items found in the database that match the where condition. If the view is rather complex, this may take some time to complete.

If it is a reasonable number, the condition is deemed to be correct. If a very large number is returned, it is likely to be a badly defined Where Condition and additional parameters should be added/modified.

Furthermore, you can look at the internal representation of the data in the result set by clicking the button. This will start a report to print out the view definition and with report parameter ‘show details’ set to Y all idents fetched by the view.

The button can be used to create all remaining invalid views.

You can display the automatically created MV_WHERE view in SQL*Plus using this command:

select text from user_views where view_name like 'MV_WHERE_9506';

TEXT

------------------------------------------------------------------------

SELECT

TAB_1.IDENT,

0 /* LN_ID */,

TAB_3.LP_ID,

0 /* RLI_ID */

FROM

MVP_IDENTS TAB_1,

M_LIST_POS TAB_3,

MVP_COMMODITY_CODES TAB_101,

M_LIST_POS TAB_102,

SYS.DUAL

WHERE 1=1

/* ---- DEFAULT WHERE-CONDITIONS FROM A.60.07. --------- */

/* --- JOIN-CONDITIONS PART 1, AUTOMATICALLY GENERATED --- */

AND TAB_101.COMMODITY_ID = TAB_1.COMMODITY_ID

/* --- JOIN-CONDITIONS PART 2, AUTOMATICALLY GENERATED --- */

/* --- JOIN-CONDITIONS PART 3, AUTOMATICALLY GENERATED --- */

AND TAB_1.IDENT = TAB_3.IDENT

AND TAB_101.COMMODITY_ID = TAB_3.COMMODITY_ID

AND TAB_102.ROWID = TAB_3.ROWID

/* --- JOIN-CONDITIONS PART 4, AUTOMATICALLY GENERATED --- */

AND /* CONDITIONS FROM A.60.06. ------------ */

TAB_101.ATTR_CHAR2 IN ('1351','1359')

AND TAB_102.TAG_NUMBER IS not null

The replacement of tables by their corresponding mvp_views in the generated views for where conditions is determined by the project default ZX_AQC_REP in the following way:

If the project default is set to N (default), no replacement takes place.

If the project default is set to Y, tables used in the generated view are replaced by their corresponding project views (mvp).

If you are using UOM, the tables M_GEOM_DETAILS and M_GEOM_IDENTS are always replaced regardless of what the project default is set to.