notify when a particular field changes

  • twin.devil

    SSC-Insane

    Points: 22208

    Check this one

    declare @IPaddresses TABLE ([IPAddress] VARCHAR(20),[dte] [smalldatetime])

    -- Inserting Data into Table

    INSERT INTO @IPaddresses(IPAddress,dte)

    VALUES('86.148.129.66','20-jun-2014 13:00:00')

    INSERT INTO @IPaddresses(IPAddress,dte)

    VALUES('86.148.129.66','20-jun-2014 13:30:00')

    INSERT INTO @IPaddresses(IPAddress,dte)

    VALUES('86.148.129.66','20-jun-2014 14:00:00')

    INSERT INTO @IPaddresses(IPAddress,dte)

    VALUES('81.222.435.80','20-jun-2014 14:30:00')

    INSERT INTO @IPaddresses(IPAddress,dte)

    VALUES('81.222.435.80','20-jun-2014 15:00:00')

    INSERT INTO @IPaddresses(IPAddress,dte)

    VALUES('81.222.435.80','20-jun-2014 15:30:00')

    INSERT INTO @IPaddresses(IPAddress,dte)

    VALUES('81.222.435.80','20-jun-2014 16:00:00')

    INSERT INTO @IPaddresses(IPAddress,dte)

    VALUES('66.113.165.99','20-jun-2014 16:30:00')

    INSERT INTO @IPaddresses(IPAddress,dte)

    VALUES('86.148.129.66','21-jun-2014 14:00:00')

    select distinct IPAddress, min(dte)

    from @IPaddresses

    group by IPAddress, convert(date,dte)

    Order by min(dte)

    Hope it helps

  • mick burden

    SSCarpal Tunnel

    Points: 4432

    That's exactly what I needed, thank you very much. Have a good day

  • twin.devil

    SSC-Insane

    Points: 22208

    Glad to help

Viewing 3 posts - 16 through 18 (of 18 total)

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