Podría ser una tabla que tenga tres campos smallInt (Mes, Dia, Tiempo)
Cita:
Tabala
Mes Dia Tiempo
1 1 89
1 2 89
1 3 89
..
..
..
1 29 89
1 30 89
1 31 90
|
Luego solo sería hacer consultas tales como
Código SQL
[-]Select Tiempo From Tabla where Dia = :dia and Mes = :Mes
Y luego en delphi podría hacer algo como esto:
Código Delphi
[-]Function fRetornarTiempo(Dia, Mes : Integer) : Integer;
begin
QConsultarTiempoXDiaYMes.close;
QConsultarTiempoXDiaYMes.ParamByName('Dia').asIntiger := Dia;
QConsultarTiempoXDiaYMes.ParamByName('Mes').asIntiger := Mes;
QConsultarTiempoXDiaYMes.Open;
if QConsultarTiempoXDiaYMes.RecordCount > 0 then
Result := QConsultarTiempoXDiaYMes.FIeldByName('tiempo').asInteger
else
Result := -1;
QConsultarTiempoXDiaYMes.close;
end;