0
日期被存儲這樣在另一個表作爲VARCHAR處理轉換VARCHAR日期(BC&AD)在SQL日期格式
select wkdocre from works;
wkdocre
-------------
+1654/12/31
+1706/12/31
+1667/12/31
-0332/12/31
-0332/12/31
-1295/12/31
並且我想要使用本身是類型的屬性插入這些日期到另一個表日期這樣
update ns_works set wor_workcreationdate=(select wkdocre from works where wor_workcreationdate=wkdocre);
我得到這個錯誤
ERROR: operator does not exist: ns_workcreationdate = dateofcreation
LINE 1: ...lect wkdocre from works where wor_workcreationdate=wkdocre);
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
感謝信
期望的結果
select wor_creationdate from ns_works;
wor_creationdate
-------------
1654/12/31
1706/12/31
1667/12/31
-0332/12/31
-0332/12/31
-1295/12/31
編輯您的問題並顯示預期結果。如果你想「插入」某些東西,爲什麼你要使用'update'? –