标题:[原创]在access里可用的查询语句,嵌到c#里就提示"from 子句错误", ...
只看楼主
blizzarc
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2005-12-22
 问题点数:0 回复次数:0 
[原创]在access里可用的查询语句,嵌到c#里就提示"from 子句错误",
在access里可用的查询语句,嵌到c#里就提示"from 子句错误",如下:

access 查询:
SELECT BID
FROM Book
WHERE BID in (select BID
from Book
where CID = @CID
AND BID not in
(select BID
from Lease ))
or BID in (select BID
from Lease where BID IN
(select BID
from Book where CID = @CID)
AND BackDate is NOT NULL);


查询字符串:

string selectBIDSql = "select BID from Book"
+ "where BID in (select BID from Book"
+ "where CID = @CID AND BID not in"
+"(select BID from Lease ))"
+ "or BID in "
+ "(select BID from Lease where BID IN"
+ "(select BID from Book where CID = @CID) "
+ "AND BackDate is NOT NULL)";//查询BID语句


迫其希望得到您的指点。
搜索更多相关主题的帖子: 子句 access 语句 提示 
2005-12-23 15:36



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-39661-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.416829 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved