3
Main.dbName = "7202"
query = "select * into " + Main.dbName + ".dbo.[AccountReceivableHistory]
from " + dbOrigin + ".dbo.[AccountReceivableHistory] where
AccountReceivableHistory].Date >= '2012-12-27' and
AccountReceivableHistory].Date < '2012-12-28'"
錯誤說爲什麼我不能「SELECT INTO」名稱以數字開頭的數據庫?
附近有語法錯誤 '7202'。
加前綴一個'架構.table'與另一個標識符的組合充當數據庫名稱。你有一個名爲'7202'的數據庫? – StuartLC
使用數字啓動數據庫對象名稱是不好的做法。您使用「」或「[]」強制引用該引用。爲什麼不像TBL_7202那樣放一個簡單的前綴呢? – wumpz