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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by drymnfr

  1. drymnfr

    Episode

    drlex, thank you for your input. I spent some time reading up Jeff Moden's article and a few other examples of "running totals". I had over 50 million records to process and using cursors was going to take a few days for me to get the results I was expecting. The following is part of what I...
  2. drymnfr

    create 90+ days incremental Timepoint variable based on start date

    Thank you for your help. As suggested I created the new field MinDate and some other fields which then allowed me to do the rest of the calculations easily, although I must say that I also ended up with a few very long case statements.
  3. drymnfr

    Episode

    Thanks to everyone for your input. drlex, you used the right words "increasing episode count". I currently do have a cursor doing this for me. I thought the experts here may suggest a more efficient and faster way of doing this instead of using cursors. I am just a beginner. Thanks again.
  4. drymnfr

    Episode

    As suggested, I did the following: select a.tblPurchasesID, a.CustomerID, a.DatePurchased as StartDate, b.DatePurchased as EndDate, Datediff(dd,b.DatePurchased,a.DatePurchased) as Interval, case when Datediff(dd,b.DatePurchased,a.DatePurchased) > 179 THEN 2 ELSE 1 END AS Episode from...
  5. drymnfr

    Episode

    Thank you to both of you. Homework?? If you consider working from home using remote login, as homework , then yes. Thanks again, with your help in this and the other thread.
  6. drymnfr

    create 90+ days incremental Timepoint variable based on start date

    My table name is tblPurchases and the structure is as follows: tblPurchasesID CustomerID DatePurchased 1 177405     4/1/2005 2 177405     7/23/2005 3 177405     7/30/2005 4 177405     1/24/2006 5 177405     6/30/2006 6 177405     7/24/2006 7 177405     7/29/2006 8 177405...
  7. drymnfr

    Episode

    I have the following table tblPurchases and structure: tblPurchasesID CustomerID DatePurchased 1 177405     4/1/2005 2 177405     7/23/2005 3 177405     7/30/2005 4 177405     1/24/2006 5 177405     6/30/2006 6 177405     7/24/2006 7 177405     7/29/2006 8 177405    ...

Part and Inventory Search

Back
Top