I have a Stored Procedure sat in my Server which I call from and Access2000 frontend, see code below;
I am having problems with the dates, the whole thing works but it doesnt limit the records down to within the date range that I pass it.
I have set everything up to make sure all parts of the application run as UK based and I am now stuck.
What am I doing wrong?
Simon ----------------------------------------
Of all the things I have lost in my life, the thing I miss the MOST is my mind!
----------------------------------------
Code:
CREATE PROCEDURE dbo.procMailDates
@StartDate datetime,
@EndDate datetime,
@Account int
AS
SELECT OrderNo,[Purchase Order Number],KPShipmentID,[Required Delivery Date],DespatchDate,ConsignmentNo,DeliveredSignee,DeliveredDate,DeliveredTime,MainOrderNo,[Order Status],NoOfBoxes,ShipTown INTO MailTemp FROM Orders WHERE AccountNo = @Account AND convert(char(10),[Required Delivery Date],103) BETWEEN convert(char(10),@StartDate,103) AND convert(char(10),@EndDate,103)
EXEC procMailUpdate
GO
I am having problems with the dates, the whole thing works but it doesnt limit the records down to within the date range that I pass it.
I have set everything up to make sure all parts of the application run as UK based and I am now stuck.
What am I doing wrong?
Simon ----------------------------------------
Of all the things I have lost in my life, the thing I miss the MOST is my mind!
----------------------------------------