Re: Help needed enforcing constraints..

From: Jennifer Brickner <brickner_at_vistachrome.com>
Date: 1996/08/27
Message-ID: <322336D4.D20_at_vistachrome.com>#1/1


Dear Julian:

I have handled similar situations by writing a PL/SQL procedure to make a minor entity table with all possible combinations. (A-Z,A-Z,A-Z,0-9,0-9)

This doesn't seem to be much of a storage issue since it's only a length 7 table even if you store a million rows. You can then make a foreign key constraint that will not permit entries in the main table not in the minor entity table.

Alternately, write a stored function to check value of substring(key,1,1) between 'A' and 'Z', etc (like the other answer). Call the function in a datbase trigger to check the value before inserting it.

Good luck!
Regards,
Jennifer Received on Tue Aug 27 1996 - 00:00:00 CEST

Original text of this message