May 16, 2012 at 2:47 pm
hi,
i have this sql proc
CREATE PROCEDURE dbo.ListeLettreFichier
-- Add the parameters for the stored procedure here
@DateDebut datetime,
@DateFin datetime
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT dbo.CSR_FILE.FIL_NAMESEND
FROM dbo.CSR_FILE
WHERE FIL_DATESEND between @DateDebut and @DateFin
END
GO
when i excecute , i got this error
USE [RECLACSR-DB]
GO
DECLARE@return_value int
EXEC@return_value = [dbo].[ListeLettreFichier]
@DateDebut = 2012/05/01,
@DateFin = 2012/05/30
SELECT'Return Value' = @return_value
GO
Msg 102, Level 15, State 1, Line 5
Syntaxe incorrecte vers '/'.
can you pliz help...
May 16, 2012 at 2:49 pm
marclas (5/16/2012)
hi,i have this sql proc
CREATE PROCEDURE dbo.ListeLettreFichier
-- Add the parameters for the stored procedure here
@DateDebut datetime,
@DateFin datetime
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT dbo.CSR_FILE.FIL_NAMESEND
FROM dbo.CSR_FILE
WHERE FIL_DATESEND between @DateDebut and @DateFin
END
GO
when i excecute , i got this error
USE [RECLACSR-DB]
GO
DECLARE@return_value int
EXEC@return_value = [dbo].[ListeLettreFichier]
@DateDebut = 2012/05/01,
@DateFin = 2012/05/30
SELECT'Return Value' = @return_value
GO
Msg 102, Level 15, State 1, Line 5
Syntaxe incorrecte vers '/'.
can you pliz help...
Put single quotes (') around your dates.
May 16, 2012 at 2:52 pm
gracias.....
May 17, 2012 at 3:20 am
Put single quotes (') around your dates
like
USE [RECLACSR-DB]
GO
DECLARE @return_value int
EXEC @return_value = [dbo].[ListeLettreFichier]
@DateDebut = '2012/05/01',
@DateFin = '2012/05/30'
SELECT 'Return Value' = @return_value
Prasad.N
Hyderabad-India.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply