calculating date differences on dynamic variables

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • b.beeching@gmail.com

    #1

    calculating date differences on dynamic variables

    Not sure if my subject is entirely accurate but here goes.

    I need to calculate the date difference between a date A and a date
    B... however date B relies entily on date A.

    EG: i have an advert in a paper (The Daily Telegraph say), now i need
    to know the next and previos dates that this occured.

    I can do this very easily for a one time calculations, however i need
    to do this for many 000's of rows.

    Now the real problem is this:

    I have a list of say 1000 with a ID of 1, and a list of 800 with ID of
    2.

    Now i need to find the nearest dates (read next/previous) in table 2
    for each entry in table 1.

    Is this possible?

    and if so any tips/helps much appreciated...

    Thanks,

    Beech

  • Tom van Stiphout

    #2
    Re: calculating date differences on dynamic variables

    On 3 Jul 2006 09:55:03 -0700, b.beeching@gmai l.com wrote:

    Not entirely sure what you mean. Can you put this in terms of the
    Northwind sample application? Also a great tool for us to experiment
    with a query.
    Perhaps you mean: give me a query that returns:
    OrderID, OrderDate, OrderDatePrevio usOrder, OrderDateNextOr der

    -Tom.



    >Not sure if my subject is entirely accurate but here goes.
    >
    >I need to calculate the date difference between a date A and a date
    >B... however date B relies entily on date A.
    >
    >EG: i have an advert in a paper (The Daily Telegraph say), now i need
    >to know the next and previos dates that this occured.
    >
    >I can do this very easily for a one time calculations, however i need
    >to do this for many 000's of rows.
    >
    >Now the real problem is this:
    >
    >I have a list of say 1000 with a ID of 1, and a list of 800 with ID of
    >2.
    >
    >Now i need to find the nearest dates (read next/previous) in table 2
    >for each entry in table 1.
    >
    >Is this possible?
    >
    >and if so any tips/helps much appreciated...
    >
    >Thanks,
    >
    >Beech

    Comment

    Working...