Database learning #1

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

declare @t table(Record_ID int, Customer_ID int, StartDateTime datetime, FinishDateTime datetime)
    
    insert @t values(1 ,123456,'2010-04-24 16:49','2010-04-25 13:37') 
    insert @t values(3 ,654321,'2010-05-02 12:45','2010-05-03 18:48') 
    insert @t values(4 ,764352,'2010-03-24 21:36','2010-03-29 14:24') 
    insert @t values(9 ,123456,'2010-04-28 13:49','2010-04-30 09:45')
    insert @t values(10,836472,'2010-03-19 19:05','2010-03-20 14:48')
    insert @t values(11,123456,'2010-05-05 11:26','2010-05-06 16:23')
    
    declare @days int
    set @days = 7
    
    select * from @t;

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results