Efectivamente era como usted lo plantea .. quedo de la siguiente forma ..
Para los rangos ..
Código Delphi
[-]
Combobox4.Clear;
For ri := 000 to 999 do
Begin
Combobox4.Items.Add(FormatFloat('000',ri));
End;
Combobox5.Clear;
For rf := 000 to 999 do
Begin
Combobox5.Items.Add(FormatFloat('000',rf));
End;
Y la busqueda sería asi ..
Código Delphi
[-]
with Query1 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT * FROM REG_CTRL.DB');
SQL.Add('WHERE CAST(SUBSTRING(GRUA_PR FROM 1 FOR 3) AS INTEGER) BETWEEN : DESDE AND :HASTA');
SQL.Add('ORDER BY GRUA_PR');
ParamByName('DESDE').AsInteger := StrToInt(Combobox4.Text);
ParamByName('HASTA').AsInteger := StrToInt(Combobox5.Text);
Open;
end;
No estaba muy relacionado con parámetros SQL con delphi pero veo que creaste dos parámetros que ayudaron a buscar mas fácil los rangos que son DESDE HASTA .. Hoy aprendi algo nuevo jejej !!
Muchas gracias .. !! tema resuelto ..