We have a reporting system that imports data from our ERP system by way of a stored procedure. The reporting system runs an EXEC StoredProcedureName with a start and end date that is manually adjusted every day. What our end goal would like to be is to have a predefined filter for the previous day so that it will only import the prior day activity. Below is an example of what our execute sql statement looks like.
EXEC dbo.ProphixSalesExport @Start_Date = N'11/20/12', @End_Date = N'11/20/12'
Any insight would be appreciatedTom
asked Nov 20 '12 at 08:10 PM in Default
Is your start and end date always the same day?
You could always declare a variable, set the variable to the previous day using getdate ()-1 and use the variable in your sproc.
declare @date date
answered Nov 20 '12 at 08:20 PM