Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Comparing Rows in the same group

$
0
0
Hi Guys,

Code:

Room ID  Hours StartTime EndTime
GR4        1        9        0810        1700
GR4        2        4        0910        1300
GR4        3        3        1710        2000
LR11        1        1        0810        0900
LR11        2        1        0910        1000
LR11        3        2        1010        1200
LR11        4        1        1210        1300
LR11        5        3        1310        1600
LR11        6        2        1610        1800
LR11        7        1        1810        1900
LR11        8        1        1910        2000
LR11        9        3        2010        2300

As you can see each room is assigned and id and once the room changes the id starts from 1 again. I don't want the 2nd row to appear because 9am - 1pm is in 8am - 5pm. How do I remove this row?

Viewing all articles
Browse latest Browse all 13329

Trending Articles