我有两张桌子iot_test1& iot_test2,内容如下。
FULL_NAME
Chanchal
Bappa
Bappa
SUBJECT---
Oracle
Unix
Unix
我在尝试创建以下不可更新的视图时遇到错误。
CREATE VIEW vw_ChanchalTest AS
SELECT full_name, subject FROM iot_test1, iot_test1;
错误:从命令行中的第1行开始出错 - CREATE VIEW vw_ChanchalTest AS SELECT full_name,主题FROM iot_test1, iot_test1错误报告 - SQL错误:ORA-00904:“SUBJECT”:无效 识别码 00904. 00000 - “%s:无效标识符” *原因:
*操作:
我对此很陌生。 请建议。
答案 0 :(得分:0)
您希望在部分iot_test1, iot_test1
中使用,但您的查询使用同一个表格subject
,其中一个 foreach (var listBoxItem in ServicePartsList.Items)
{
item = listBoxItem.ToString();
string[] result = item.Split(',');
MessageBox.Show(result[0] + result[1]);
using (OleDbConnection conn = new OleDbConnection())
{
conn.ConnectionString = connection.dbdataSource;
// insert into database
using (OleDbCommand addPart = new OleDbCommand())
{
//Open Connection
conn.Open();
addPart.Connection = conn;
addPart.CommandText = "INSERT INTO servicePart (ServiceID, PartNo, Quantity) VALUES (@sID, " + "@partNo, " + "@quantity)";
addPart.Parameters.AddWithValue("sID", ModelCode + ModelYear + ButtonClick);
addPart.Parameters.AddWithValue("partNo", result[0]);
addPart.Parameters.AddWithValue("quantity", result[1]);
//execute SQL
int recordsAdded = addPart.ExecuteNonQuery();
//Close DB Connection
conn.Close();
}
列不存在。