Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
小数点以下の数値を持つデータセットから観測を削除する必要があります。日付セットに含まれてはならない数字がいくつか混在しており、小数点の後に数字があること以外に、それらがどれであるかを知ることはできません例: 9.42
対実際のデータは、9.0、10.0、100.0 です。
SQLでこれを行う方法はありますか?
次のようなものは、ほとんどのデータベースで機能します。
delete from table where number <> cast(number as int);
または、「number」が実際に文字列の場合:
delete from table where number like '%.%' and number not like '%.0';