我有:
表信息更新
+-------+-----------+-----------+-----------+--- --------+
| idKey1| idKey2 | __date_Update_ | 日周|
+-------+-----------+------------+-----------+----- ------+
| 1___ | __ 3 __ _ _ | 2013.01.01 15:00:00 | 2 |
| 1___ | __ 3 __ _ _ | 2013.01.01 18:00:00 | 2 |
| 1___ | __ 3 __ _ _ | 2013.01.02 15:00:00 | 3 |
| 1___ | __ 3 __ _ _ | 2013.01.02 18:00:00 | 3 |
| 1___ | __ 3 __ _ _ | 2013.01.03 15:00:00 | 4 |
| 1___ | __ 3 __ _ _ | 2013.01.03 18:00:00 | 4 |
+-------+-----------+------------+-----------+----- ------+
如何仅通过时间戳获取前一行
选择 * FROM infoUpdate if where date_Update <='2013.01.03 18:00:00';
这就是我正在寻找的:
+-------+-----------+------------+-----------+----- ------+
| idKey1| idKey2 | 日期_更新 | 日周|
+-------+-----------+------------+-----------+----- ------+
| 1 | 3 | 2013.01.01 18:00:00 | 2 |
| 1 | 3 | 2013.01.02 18:00:00 | 3 |
| 1 | 3 | 2013.01.03 18:00:00 | 4 |
+-------+-----------+------------+-----------+----- ------+