Need help with Query on Historical Data

  • I solved the problem using this query.  I'm not sure how it will perform yet, so I'll have to let you all know later.

    Select Item, Date, Time, NewCost, OldCost

    From #CostHist a

    Left Join #CostHist b

    on a.item = b.item and a.date = b.date and a.time = b.time and a.newcost = b.oldcost

    Where a.Item = 1

    and a.date <=9950

    and a.time <=750

    and b.date is null

Viewing post 1 (of 2 total)

You must be logged in to reply to this topic. Login to reply