Subject | Re: [ib-support] Advice |
---|---|
Author | Claudio Valderrama C. |
Post date | 2002-02-13T07:01:23Z |
""Luiz"" <cprmlao@...> wrote in message
news:002e01c1b414$07e861a0$010aa8c0@......
before insert & update trigger to populate that field. Instead of writing
the month, write
month * 100 + day
and do your seaches the same way. Put an index on that field.
Another solution is that you go to the sources, enable expression indices,
recompile the engine and see what you get.
:-)
BTW, if people don't know, the DSQL syntax allows to define an expression
index, but the core engine complains because the feature is disabled:
create [unique] [ascending | descending] index <name>
on <table_name> computed by (<expression>);
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing
news:002e01c1b414$07e861a0$010aa8c0@......
>period.
> Let's upon the bitrthsays are(dd/mm):
> 11/03
> 12/03
> 15/04
> 18/06
> ....
>
> If I use a dateonly column and creating a index on this column, it will
> inadequate to use this index to locate persons doing birthdays in a
> If I want all person doing birthdays between 11/01 and 15/04, what will bevarchar?
> the better option to columns saving this values and your indexes? A
> two smallints, one to month and other to day?Then just extend my suggestion and use the same smallint field and the
before insert & update trigger to populate that field. Instead of writing
the month, write
month * 100 + day
and do your seaches the same way. Put an index on that field.
Another solution is that you go to the sources, enable expression indices,
recompile the engine and see what you get.
:-)
BTW, if people don't know, the DSQL syntax allows to define an expression
index, but the core engine complains because the feature is disabled:
create [unique] [ascending | descending] index <name>
on <table_name> computed by (<expression>);
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing