Ajuda Consulta SQL

Delphi

04/04/2005

Por que está gerando este erro, nunca compila o procedimento.


create procedure Periodo
(
DataInicial date,
DataFinal date
)
as
begin
select * from Ponto where Data between DataInicial and DataFinal
end

=====================erro========================Dynamic SQL Error
SQL error code = -104
Token unknown - line 9, char -1
end
Statement: create procedure Periodo
(
DataInicial date,
DataFinal date
)
as
begin
select * from Ponto where Data between DataInicial and DataFinal
end


Ullrich

Ullrich

Curtidas 0

Respostas

Rjun

Rjun

04/04/2005

Tente isso :

Create Procedue Periodo @DataInicial Date,
@DataFinal Date
As
select * from Ponto where Data between @DataInicial and @DataFinal
Return(0)
go


GOSTEI 0
Kotho

Kotho

04/04/2005

Tente por um ponto-e-vírgula no final do select...


GOSTEI 0
Gandalf.nho

Gandalf.nho

04/04/2005

[b:7cb8a9cbf6][color=red:7cb8a9cbf6]Bloqueado por Infração às Regras de Conduta :[/color:7cb8a9cbf6][/b:7cb8a9cbf6]

Triplicidade
[url]http://forum.clubedelphi.net/viewtopic.php?p=194458[/url]
[url]http://forum.clubedelphi.net/viewtopic.php?p=194674[/url]

Para maiores esclarecimentos pode mandar-me uma [url=http://forum.clubedelphi.net/privmsg.php?mode=post&u=8378]Mensagem Particular[/url].


GOSTEI 0
POSTAR