Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Shal2
  • Order by date
  1. Shal2

    DTS Schedule Parameters month range

    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
  2. Shal2

    DTS Schedule Parameters month range

    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...
  3. Shal2

    Combine two select in stored procedure for report

    Hi SQLSister, Thank you for the idea, I had never created subreports before, but now for this one I did and it works. Thank you, Shal
  4. Shal2

    Combine two select in stored procedure for report

    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...
  5. Shal2

    Group by days of week

    Hi Phil, Will try the datepart in the stored procedure. Thank you for the help, Shal
  6. Shal2

    Group by days of week

    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.
  7. Shal2

    Group by days of week

    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...
  8. Shal2

    Group by days of week

    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...
  9. Shal2

    Dates rounding to nearest monday

    Thank you Nathan, It works very well for me and thank you for the explaining it as well. Shal
  10. Shal2

    Dates rounding to nearest monday

    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...
  11. Shal2

    Null display as 1/1/1900

    In the table design, have you removed the default value? Shal
  12. Shal2

    Ideas for duty drawback query

    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...
  13. Shal2

    Ideas for duty drawback query

    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...
  14. Shal2

    Ideas for duty drawback query

    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...
  15. Shal2

    Ideas for duty drawback query

    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...
  16. Shal2

    Ideas for duty drawback query

    Hi All, Since I got no response to this question, I am providing more details hoping that someone might give me ideas to work this one out. The SP below works well, only problem with this is I might have more than one row for same barcode and style with different duty paid. So in the "update...
  17. Shal2

    importing Excel to Sql Server

    I think I came across this problem, but my table was empty to start with, and I was getting the same error. What I did was, add a test row (just one) to the table. Then the DTS import worked fine. Hope this helps, Shal
  18. Shal2

    Temp variable table data type update

    Thank you Nathan, Your it worked. Thanks to all of you who replied. Regards, Shal
  19. Shal2

    duplicate records on my bill of lading please help!

    Will distinct keyword help? Shal
  20. Shal2

    Temp variable table data type update

    Hello Karl, The error message is " must declare variable @summary" and it is not giving the error line, but my guess is the SET of the update statement or the where clause of the update statment. In the code below : I changed the: ------------------------------------------ SET @summary.qty =...

Part and Inventory Search

Back
Top