John Kaufmann wrote:
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
Hi John,
OK - first I take it that what you are talking about here is Base with
an embedded database as opposed to working against MySQL or Postgres.
In this case HSQLdb does not support an ENUM field type.
However it does indeed support constraints on table columns, including a
CHECK constraint.
So cutting to the chase.
Assume I have a Table that I want to add that priority column to.
In the SQL window I would use TWO commands, separated by semi-colon
ALTER TABLE "Table1" ADD COLUMN "Priority" NUMERIC(1,0) DEFAULT 1 NOT NULL;
ALTER TABLE "Table1" ADD CHECK( "Priority" > 0 AND "Priority" < 6 );
That's it. Notice the slight syntax changes in my statements.
HTH
Drew
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]