Hi,
If anybody is interested I decided to do it inside the stored procedure. And scheduling the DTS package to run on the first day of every month.
I am setting EndDate to getdate() and startdate to
dateadd(mm,-1,@getdate()).
I guess this will work for me,
thanks,
Shal
Hi All,
I have a simple DTS Package which executes a stored procedure and exports the result to an Excel file.
In the stored procedure I use two dates like:
Select * from Table1 where
ScanDate betweeen @StartDate and @EndDate.
Now I want to schedule the DTS Package so that it runs once every...
Hi All,
This is related to one of my previous posts but different issue.
This stored procedure has two select statement which returns two different sets of data, (one may return 200 rows, the other may return 400), but I want to have both on a single report for comparision. I have tried union...
I was able to achieve this from the report by using:
grouping similar to:
=WeekDayName(weekday('mydate'))
This was in reporting services and this can be done in crystal reports also I guess.
Thanks,
Shal.
Here is the stored procedure:
CREATE PROCEDURE FootTraffic_test
@Store VARCHAR(35),
@StartDate Datetime,
@EndDate Datetime
AS
SET @StartDate =
CASE
WHEN datepart(dw, convert(datetime, @StartDate)) = 2
THEN @StartDate
WHEN datepart(dw, convert(datetime, @StartDate)) between 3...
I have a stored procedure.
It takes two parameters @StartDate and @EndDate. When any date range is entered, @startdate always selects the closest monday and @enddate always selects the closest sunday(some one helped me out). It works fine as I did this for weekly results. Now they want to enter...
Hi All,
If I have two dates in a stored procedure, like
@StartDate and @EndDate, if the user puts in any dates for these two parameters, how can I round it to the nearest monday.
Let's say
user inputs:
@StartDate = '06/04/2004' and @EndDate = '06/12/2004'
I want @StartDate ='06/07/2004' and...
I am a bit confused now, I was thinking, we will do dutydraw back for each month, let's say for Jan 2004, I get all the barcodes we have exported. Then run the report only once for january. At that time, the stored procedure will use up whatever information we have in the import table JKMT...
Hi Tektipdejango,
I now see that you have already used the first row since we were 5 Qty short, yes you are absolutely correct that is what I want to do. Now in the report for dutydraw back for the second export the value should be (25*1.3012+ 5*1.2825)
Karl,
We will have all the information...
Hi all,
Thank you for all the replies.
Tektipdejango you have clearly expressed what I am trying to do exactly. Is it possible ? If yes how?
Along with updating the JKMT table I want the duty paid amount in the barcode export table, for the report. Now let's say I had a third export of the...
Hi,
We have two tables, Trandetail (td) which has all the barcodes and styles we export. From this I get the quantity we export for a date range. We have another table JKMT which has all the information about all the barcodes and styles we have imported.
In my stored procedure, to create a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.