• I took what Sean put together and added a little more sample data (a second order number) and changed it up a little. If I am correct you need the difference between the PUP and DRP that relate to each order number. Let us know if this does is what you need.

    if OBJECT_ID('tempdb..#Something') is not null

    drop table #Something

    create table #Something

    (

    OrderNum int,

    Location varchar(10),

    PUPDRP char(3),

    SomeValueOfSomething int,

    StopTime datetime,

    col tinyint

    )

    insert #Something

    select 1303927, 'Whouse1', 'PUP', 4394903, '2013-08-11 07:26:33.000', 1 union all

    select 1303927, 'Store1', 'DRP', 4394904, '2013-08-11 08:31:46.000', 2 union all

    select 1303927, 'Store2', 'DRP', 4394907, '2013-08-11 09:28:57.000', 2 union all

    select 1303927, 'Store3', 'DRP', 4395040, '2013-08-11 10:38:53.000', 2 union all

    select 1303928, 'Whouse1', 'PUP', 4394903, '2013-08-12 07:26:33.000', 1 union all

    select 1303928, 'Store1', 'DRP', 4394904, '2013-08-12 09:31:46.000', 2 union all

    select 1303928, 'Store2', 'DRP', 4394907, '2013-08-12 11:28:57.000', 2 union all

    select 1303928, 'Store3', 'DRP', 4395040, '2013-08-12 12:38:53.000', 2

    select d1.*, DATEDIFF(HOUR,d2.StopTime,d1.StopTime) AS TimeBetween

    from #Something d1

    JOIN (SELECT OrderNum, StopTime FROM #Something WHERE col=1) d2

    ON d1.OrderNum=d2.OrderNum

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001