Hi,
I have a table with this schema:
DeviceID int
RoomID int
DateInstalled datetime
A sample of the table's data looks like:
DeviceID RoomID DateInstalled
0001 Room1 1/1/2000
0002 Room1 1/1/2000
0001 Room2 2/1/2000
I need to build a query that will give me the date range each device was located on a specific room. Something like:
DeviceID RoomID From Date To Date
0001 Room1 1/1/2000 1/31/2000
0001 Room2 2/1/2000 NULL
0002 Room1 1/1/2000 NULL
Any help will be appreciated,
Thanks.