易截截图软件、单文件、免安装、纯绿色、仅160KB

Access高手,查询关于重复记录问题??双表

引用 13 楼 acmain_chm 的回复:
SQL codeselecttop3*from t_reyoreyoreyo twhere nclassid='Bush'andnotexists (select1from t_reyoreyoreyowhere nclassid='Bush'and O_Id <t.O_Idand (opertiontime=t.opertiontimeor unitprice=t.unitprice
      ¡­


select top 6 * from "+enttable+" t where nclassid=? and not exists ( select 1 from "+enttable+" where nclassid=? and goodsid <t.goodsid and (opertiontime=t.opertiontime or unitprice=t.unitprice) ) order by opertiontime desc


我还想显示 "+usitable+" 中的 company 字段,"+usitable+"与 "+enttable+" 通过
"+usitable+".username="+enttable+".buyform

我这样写不行
select top 6 * from "+enttable+" t where nclassid=? and not exists ( select 1 from "+enttable+","+usitable+" where "+usitable+".username="+enttable+".buyform and "+usitable+".nclassid=? and goodsid <t.goodsid and (opertiontime=t.opertiontime or unitprice=t.unitprice) ) order by opertiontime desc

望高手帮忙啊
没看懂你的需求。

建议你用些例子说明。

建议你列出你的表结构,并提供测试数据以及基于这些测试数据的所对应正确结果。

我想实现:查询指定表的("+enttable+" )的指定分类(nclassid=?)的,不同时间(opertiontime)不同价格(unitprice)的前3条记录。




相关问答:

asp跟Access数据连接问题。

IsSqlDataBase = 0 '主数据库类型(1=SQL,0=AC)

'===========================================================================
SqlDatabaseName = "ads365" '主数据库名
S ......

access不能修改内容

如题在我打开access修改的时候报错
我装的Ghost 的XP版 sp3的补丁
错误签名
AppName: msaccess.exe      AppVer: 11.0.8166.0    AppStamp:46437912
ModName: pintlgnt.ime&n ......

ACCESS的自定义函数在delphi里怎么用呢...

我在模块里自定义了一个函数:stradd()

可是在adoquery1.sql.add('select stradd(author) from book');
时提示stradd未定义...

这个问题有什么办法可以解决的吗? 非常感激!


(在A ......

如何读取这种数据,在access里面。求教高手

我的一个access数据库中的photo字段中的内容是这样的:

|/UpFiles/Picture/admin/200910162300187612.jpg|/UpFiles/Picture/admin/200910162300187612.jpg||||/UpFiles/Picture/admin/200910162300187612.jpg ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号