レコードをエクスポートしましたが、特定の日にエクスポートされたレコードを知りたいです。それは動作しません。クエリを実行した場合のデータは次のとおりです。
* comapny Name * * date exported *
ABC Company, Inc 2011-08-01 15:44:52.857
XYZ Company, Inc 2011-08-01 15:44:52.857
完全一致を取得しないこのコマンドを発行します
select companyname, exporteddate from mytable exporteddate = '2011-08-01' <- does not work
select companyname, exporteddate from mytable exporteddate like '%2011-08-01%' <-- tried this variation too and many other, did not work
興味深いのは、>=、>、<= が機能することです。本当に問題は何ですか?エクスポートされた日付は、datetime フィールドとして宣言されます。
select companyname, exporteddate from mytable exporteddate >= '2011-08-01' <- this works
私はWindows XP、MS-SQL 2005 SP3を使用しています(正確ではありませんが、近いです)。