Thanks. I now have this issue where I can't create the unique index on this
table because the email_address is often times blank or unknown for a while
(The front-end_application sets is value to '' (blank) on inserts and
updates if the user doesn't enter it so instead of going in as NULL, the
field gets a blank field value...
Is there a way to get UNIQUE index to treat blank data fields that are part
of the index as null and not enforce the constraint if the subject columns
are blank (whitespace)... Do I need to force the application to not pas the
value into the field and make it NULL instead.
On 10/5/06, Dan Buettner <drbuettner@stripped> wrote:
> Ferindo, you can create multiple UNIQUE indexes on a table to enforce
> your data requirements.
> On 10/5/06, Ferindo Middleton <ferindo.middleton@stripped> wrote:
> > I have a primary key set on a table which consists of the combination of
> > values: firstname, lastname, and a schedule_id (BIGINT(20))... I have
> > so the records in this table do not have duplicates, being that no one
> > record should have the exact same name and schedule_id identifier.
> > However, I want to keep this same restriction while also ensuring that
> > two records have the same email_address and schedule_id identifier...
> > You can't have the db enforce two different primary keys on one table,
> > how would I implement having this kind of restriction, which, in itself,
> > seems to require that I have a second primary key to enforce another
> > constraint to dissalow records to be added that carry the same
> > of: email_address and schedule_id?
> > just ferindo