我在此查询中遇到上述错误。
string query3 = "select Stock_Price,Stock_Quan_Met from Stock where Item_Id=(select ItemTileId from ItemTiles where ItemName=@itm) ORDER BY"+
"Stock_Date ASC";
答案 0 :(得分:3)
您的查询结果
select Stock_Price,Stock_Quan_Met from Stock where Item_Id=(select ItemTileId from ItemTiles where ItemName=@itm) ORDER BYStock_Date ASC
至少添加一个空格,你很好。
string query3 = "select Stock_Price,Stock_Quan_Met from Stock where Item_Id=(select ItemTileId from ItemTiles where ItemName=@itm) ORDER BY "+
"Stock_Date ASC";