我有一張表,其中包含從氣象觀測中收集的數據。數據不良,因此在將數據插入數據庫時出錯。在最近的瀏覽中,我發現了非數字數據,他們不應該是任何數據。在postgresql數據庫中查找包含非數字值的行
如何選擇非數值存在的行?
表的佈局如下:
#\d data.tempe
Table "data.tempe"
Column | Type | Modifiers
------------+-----------------------+-----------
id-station | integer |
year | integer |
t1 | character varying(25) |
t2 | character varying(25) |
t3 | character varying(25) |
t4 | character varying(25) |
t5 | character varying(25) |
t6 | character varying(25) |
t7 | character varying(25) |
t8 | character varying(25) |
t9 | character varying(25) |
t10 | character varying(25) |
t11 | character varying(25) |
t12 | character varying(25) |
或另一種解決方案是將非數字值更改爲預定義值 – user528025 2012-07-18 22:22:43