回答編集履歴
1
回答追記
answer
CHANGED
@@ -1,6 +1,17 @@
|
|
1
|
+
「2015年2月以降のデータを取得」と例のSQLの条件(`SUBSTR(test_ymd,1,6)> '201502'`と2015年02月より大きいなので2015/03/01以降)が合いませんが。
|
2
|
+
|
1
3
|
関数使わないとしたら以下しかないと思います。
|
2
4
|
|
3
5
|
```SQL
|
6
|
+
-- 2015/03/01以降なら
|
4
7
|
select * from Table01 where test_ymd > '20150228';
|
8
|
+
select * from Table01 where test_ymd >= '201503';
|
9
|
+
select * from Table01 where test_ymd >= '20150300';
|
5
10
|
select * from Table01 where test_ymd >= '20150301';
|
11
|
+
-- 2015/02/01以降なら
|
12
|
+
select * from Table01 where test_ymd > '20150131';
|
13
|
+
select * from Table01 where test_ymd > '201502';
|
14
|
+
select * from Table01 where test_ymd > '20150200';
|
15
|
+
select * from Table01 where test_ymd >= '20150201';
|
6
|
-
```
|
16
|
+
```
|
17
|
+
|