New Database Server parameter, preventing the selection of unspecified values (?) using...

  • Thread starter Thread starter jarekf
  • Start date Start date
Status
Not open for further replies.
J

jarekf

Guest
Quote from the documentation: http://documentation.progress.com/output/OpenEdge114/pdfs/webpapers/ABL_triggers_and_indexes.pdf (site 24) "Indexes and unknown values. If an index contains an Unknown value (?), the AVM sorts that value higher than any other value." Now the database is functioning ambiguously. example: DEFINE TEMP-TABLE tt FIELD f1 AS INTEGER INITIAL ? /*indexed field*/ FIELD f2 AS INTEGER INITIAL ? INDEX ix f1. CREATE tt. FIND FIRST tt NO-LOCK WHERE f1 0 NO-ERROR. MESSAGE "Is indexed field containing unknown value part of the result set?" SKIP AVAIL tt SKIP " (YES - ? 0 = TRUE ??? NOT OK) " VIEW-AS ALERT-BOX INFO BUTTONS OK. FIND FIRST tt NO-LOCK WHERE f2 0 NO-ERROR. MESSAGE "Is unindexed field containing unknown value part of the result set?" SKIP AVAIL tt SKIP "(NO - ? 0 = ? OK)" VIEW-AS ALERT-BOX INFO BUTTONS OK. Solution: After adding a new Database Server parameter (eg. -nosuvgt), the action would be unambiguous. example: DEFINE TEMP-TABLE tt FIELD f1 AS INTEGER INITIAL ? /*indexed field*/ FIELD f2 AS INTEGER INITIAL ? INDEX ix f1. CREATE tt. FIND FIRST tt NO-LOCK WHERE f1 0 NO-ERROR. MESSAGE "Is indexed field containing unknown value part of the result set?" SKIP AVAIL tt SKIP " ( NO - ? 0 = ? OK )" VIEW-AS ALERT-BOX INFO BUTTONS OK. FIND FIRST tt NO-LOCK WHERE f2 0 NO-ERROR. MESSAGE "Is unindexed field containing unknown value part of the result set?" SKIP AVAIL tt SKIP "(NO - ? 0 = ? OK)" VIEW-AS ALERT-BOX INFO BUTTONS OK. Applies to: FOR, FIND, CAN-FIND, SELECT, QUERY, ODBC

Continue reading...
 
Status
Not open for further replies.
Back
Top