我想将数据从 detailsview(tableName=Jobs) 复制到另一个表(tablename=Company) 但它显示错误,例如 Incorrect syntax near ')' 我的代码如下:
string apply = "INSERT INTO Company (JobTitle,CompanyName) select JobTitle,CompanyName from Jobs)";
我正在使用 asp.net
我想将数据从 detailsview(tableName=Jobs) 复制到另一个表(tablename=Company) 但它显示错误,例如 Incorrect syntax near ')' 我的代码如下:
string apply = "INSERT INTO Company (JobTitle,CompanyName) select JobTitle,CompanyName from Jobs)";
我正在使用 asp.net
你应该使用它,最后删除)
string apply = "INSERT INTO dbo.Company (JobTitle) select JobTitle from Jobs";
更新 根据更新的问题。
string apply = "INSERT INTO Company (JobTitle,CompanyName) select JobTitle,CompanyName from Jobs";
string apply = "INSERT INTO dbo.Company (JobTitle) select JobTitle from Jobs)";
我不想指出明显的,但最后你有一个额外的')'。:)