Subject | Re: [firebird-support] Case insensitive Insert with Unique Column |
---|---|
Author | Helen Borrie |
Post date | 2008-04-15T14:40:29Z |
At 11:49 PM 15/04/2008, you wrote:
Have a Before Insert trigger to populate the "case insensitive" column:
as
if (new.MixedCaseColumn is not null) then
new.CaseInsensitiveColumn = UPPER(new.MixedCaseColumn);
Of course, if MixedCaseColumn is non-nullable, the null test isn't required.
./heLen
>Is there a way to prevent a Insert, if a unique column contains theAdd another column, a varchar of the same size, and place the unique index on it, not on the mixed case column.
>same word which is to insert but only in upper chars ?
Have a Before Insert trigger to populate the "case insensitive" column:
as
if (new.MixedCaseColumn is not null) then
new.CaseInsensitiveColumn = UPPER(new.MixedCaseColumn);
Of course, if MixedCaseColumn is non-nullable, the null test isn't required.
./heLen