Subject Re: [ib-support] Advice
Author Luiz
Claudio,

> ""Luiz"" <cprmlao@...> wrote in message
> news:017201c1b375$f5dcfa50$010aa8c0@......
> > I need advice about which the better choice to a column to store
> birthdays,
> > so that locating rows to birthdays in a period will be fast.
>
> I don't understand well. There's only one option: the true DATE-only type
in
> dialect 3. This is internally a signed long integer.
>
> Or do you need to sort do a grouping by month, whatever the year is? In
that
> case, you could have a trigger that populates a smallint column that keeps
> separately the month for those purposes even with the date field present.
> Don't give up that date field, as it's the easier way to calculate date
> differences and the like.

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 period.
If I want all person doing birthdays between 11/01 and 15/04, what will be
the better option to columns saving this values and your indexes? A varchar?
two smallints, one to month and other to day?

Luiz.