我似乎无法弄清楚为什么以下语句没有执行。oracle 语句在 sql developer 中完美运行。我正在使用此按钮将“neft_temp”中的新数据插入“bbbt”
private void button3_Click(object sender, EventArgs e)
{
OracleConnection con = new OracleConnection("Data Source=KBETEST; Persist Security Info=TRUE; User ID=dbo; Password=dbo123; Unicode=True");
OracleDataAdapter da = new OracleDataAdapter();
string str = "insert into bbbt(bankid,benbrn_code,brn_name,brn_addr,brn_loc,brn_stat,brn_city,coun_code,remarks,ifsc_code,rtgs_stat) select substr(ifsc_code,1,4), substr(ifsc_code,5), n.branch_name, n.address1, n.district, n.state, n.city, 'IN', n.bank_name, n.ifsc_code,n.status from neft_temp n where ifsc_code in (SELECT ifsc_code FROM neft_temp MINUS SELECT ifsc_code FROM bbbt)";
con.Open();
da.InsertCommand = new OracleCommand(str, con);
da.InsertCommand.ExecuteNonQuery();
con.Dispose();
button4.PerformClick();
}