Subject | Re: [firebird-support] Case insensitive Insert with Unique Column |
---|---|
Author | Teträm Corp |
Post date | 2008-04-16T17:05:16Z |
Hi,
using a personal collate is (will be?) also possible, isn't it?
(I don't remember the version of fb and if it can be used like this)
Thomas Steinmaurer a écrit :
using a personal collate is (will be?) also possible, isn't it?
(I don't remember the version of fb and if it can be used like this)
Thomas Steinmaurer a écrit :
>
> >> Is there a way to prevent a Insert, if a unique column contains the
> >> same word which is to insert but only in upper chars ?
> >
> > Add another column, a varchar of the same size, and place the unique
> index on it, not on the mixed case column.
> >
> > 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.
>
> Just a note. In Firebird 2.x, one could create an UNIQUE expression
> index with UPPER on the field in question.
>
> --
> Best Regards,
> Thomas Steinmaurer
> LogManager Series - Logging/Auditing Suites supporting
> InterBase, Firebird, Advantage Database, MS SQL Server and
> NexusDB V2
> Upscene Productions
> http://www.upscene.com <http://www.upscene.com>
>
>