Fórum pesquisa em sql #345416
01/09/2007
0
with IBQuery1 do
begin
close;
sql.Clear;
sql.add(´select * from ordem_SERVICO where´);
sql.add(´numero >=:dtini and numero<=:dtfim´);
sql.add(´order by numero´);
ParamByName(´dtini´).AsInteger:=strtoint(MaskEdit1.Text);
ParamByName(´dtfim´).AsInteger:=strtoint(MaskEdit2.Text);
open;
if IsEmpty then
begin
Showmessage(´Não existe Registros neste intervalo, tente outra vez´);
close;
end;
Se alguem puder me ajudar?
Pattarelli
Curtir tópico
+ 0Posts
01/09/2007
Raserafim
sql.add(´[b:f903b5400e]([/b:f903b5400e]numero >=:dtini[b:f903b5400e])[/b:f903b5400e] and [b:f903b5400e]([/b:f903b5400e]numero<=:dtfim[b:f903b5400e])[/b:f903b5400e]´);
Gostei + 0
01/09/2007
Pattarelli
Gostei + 0
03/09/2007
Superdelphi
(numero >=:dtini) and (numero<=:dtfim)
Gostei + 0
03/09/2007
Raserafim
a sintaxe é a seguinte:
where nomecampo between valor1 and valor2
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)