como usar o between numa SQl no Delphi

Delphi

24/03/2003

Ex:

qrygrafico.sql.add(´select * from notas where pb between 9,5 and 10´)

Está dando os seguintes erros:
- [Error] UnitGrafAnaliseProva.pas(88): Unterminated string
- [Error] UnitGrafAnaliseProva.pas(89): ´)´ expected but identifier ´QryGrafico´ found

o campo pb é numeric com 2 casas decimais.

Como corrigir o erro?


Anonymous

Anonymous

Curtidas 0

Respostas

Biscalquini

Biscalquini

24/03/2003

Coloque
qrygrafico.sql.add(´select * from notas where pb between (´´´+´9,5´+´´´) and (´´´+´10´+´´´)´)

Deve funcionar...

ou pase como parametros

qrygrafico.sql.add(´select * from notas where pb between :Inicial and :Final´)

Params[0].Value:=9,5;
Params[1].Value:=10;


GOSTEI 0
POSTAR