0

我在这个查询中遇到了上述错误。

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";
4

1 回答 1

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";
于 2012-05-01T08:57:43.413 回答