SQL Server 2008 に ,timestamplog which contains one column of name LogTime of type
INTEGER`というテーブルがあります
値は次のようになります。
1350468610,
1350468000,
1350381600,
1350295810
1350468609
と1350468001
..の間の値が必要です。
これらの値を照会する方法を教えてください。
次のクエリを試しました
select LogTime
from timestamplog
where LogTime between 1350468609 and 1350468001
select LogTime
from timestamplog
where LogTime >= '1350468610' and LogTime <= '1350468000'
select LogTime
from timestamplog
where LogTime >= convert(decimal, 1350468610) and LogTime <= convert(decimal,1350468000)
select LogTime
from timestamplog
where LogTime >= convert(varchar, 12) and LogTime <= convert(varchar, 14)
でも列が来ない…
実際、テーブル内の値は、テーブルに保存されているタイムスタンプ値ですINTEGER
。TIMELOG
IMP 注: table に 12,13,14 のような値が含まれている場合、上記のクエリが正常に機能しているとします。しかし、長さ10の数を比較しているとき、クエリは値を取得しません
前もって感謝します