SQL查詢?
有表T如下:
a b c d
===============================================
2006-10-09 12:50:00.000 a b 1
2006-10-09 12:05:00.000 a b 2
2006-10-09 12:05:00.000 c b 3
2006-10-09 12:15:00.000 c a 4
2006-10-10 12:01:00.000 a b 5
2006-10-10 12:11:00.000 a c 6
2006-10-05 12:11:00.000 a d 7
2006-10-05 12:10:00.000 c a 8
b c 兩列確定唯一行
求指定a時間點的 唯一行 當前值
如指定a=2006-10-10 12:11:00.000
===========>
2006-10-10 12:01:00.000 a b 5
2006-10-10 12:11:00.000 a c 6
2006-10-05 12:11:00.000 a d 7
2006-10-09 12:15:00.000 c a 4
2006-10-09 12:05:00.000 c b 3
如指定a=2006-10-09 12:50:00.000
===========>
2006-10-09 12:50:00.000 a b 1
2006-10-05 12:11:00.000 a d 7
2006-10-09 12:15:00.000 c a 4
2006-10-09 12:05:00.000 c b 3
------解决方案--------------------指定了如此具体的时间,为什么返回了其他几条时间不相等的?
请lz提示。