Trying to set up a problem resolution database, which includes a "Problems" table, I am stymied on a small but critical point: how to handle ENUMerated values in a "Priority" field (as in: 1=highest priority, 5=lowest priority)? I tried googling this problem and was not encouraged by the results, which seem to indicate that Base does not support many standard database features, including this one. So I tried to specify the field as "Number[NUMERIC]" with Length 1, but Base complains:

    Column constraints are not acceptable in statement
    [ALTER TABLE "Problems" ADD "Priority" NUMERIC(1) NOT NULL()]

OK. Focusing on the "NOT NULL()" qualifier, I find I can make Base accept the field by removing the "Entry required" [NOT NULL()] constraint. IOW, that error is a consequence of trying to substitute a NUMERIC(1) field (which can include 0) for an ENUM{1..5} field, because Base in incapable of distinguishing between an empty field and an entry of 0. This means I cannot, in practice, require the user to enter a "Priority" estimate.

Before I give up, has anyone found a way to mimic this limited used of enum fields, and to dispose of that Base error without giving up the requirement for a Priority estimate?

John

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to