Access2000数据库中distinct参数好象不起作用??

bushido 2003-08-19 08:59:15
如题
...全文
116 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
hohott 2003-08-22
  • 打赏
  • 举报
回复
select xxx,yyy from table where xxx in(select distinct XXX from table)

这不是自相矛盾么,table 里有xxx的当然会全部取出
bushido 2003-08-22
  • 打赏
  • 举报
回复
up
bushido 2003-08-22
  • 打赏
  • 举报
回复
说的对
diya 2003-08-20
  • 打赏
  • 举报
回复
没有解决,在ACCESS中,好象distinct起不了作用,我用的是ACCESS2000
bushido 2003-08-20
  • 打赏
  • 举报
回复
TO 风火浪
有没有解决
怎么解决
diya 2003-08-20
  • 打赏
  • 举报
回复
关注,这个问题我也遇见过。
bushido 2003-08-20
  • 打赏
  • 举报
回复
急,飞鸽传书
bushido 2003-08-20
  • 打赏
  • 举报
回复
up too
bushido 2003-08-20
  • 打赏
  • 举报
回复
我的意思是
select distinct XXX from table当然是可以的
只是想一并取出其它字段时则不对
比如说
select distinct xxx,yyy from table就不对了
我改成 select xxx,yyy from table where xxx in(select distinct XXX from table)
竟然也不对。气坏了

help me
bushido 2003-08-19
  • 打赏
  • 举报
回复
help
bushido 2003-08-19
  • 打赏
  • 举报
回复
什么意思
1蓝天1 2003-08-19
  • 打赏
  • 举报
回复
好像多了空格在distinct后面
bushido 2003-08-19
  • 打赏
  • 举报
回复
楼上的,你测试过了吗,在access2000?
julong88 2003-08-19
  • 打赏
  • 举报
回复
起作用!
bushido 2003-08-19
  • 打赏
  • 举报
回复
这些写法在sql server中应该是没问题的,但是在access2000中就不行

!@#$!@#$
bushido 2003-08-19
  • 打赏
  • 举报
回复
不好意思,我没有表述清楚

select p.smallimg,p.id,p.name,p.prod_cd,p.marketprice,p.multi_pic from productsort c right outer join product p on p.productsort=c.id where c.fatherid=187 and p.smallimg in(select distinct smallimg from product) order by p.id desc
我测试过,不行,
当然只是用select distinct smallimg from product 是可以的

我又用
select distinct p.smallimg,p.id,p.name,p.prod_cd,p.marketprice,p.multi_pic from productsort c right outer join product p on p.productsort=c.id where c.fatherid=187 也不行

又加了group by还是不行
Brookes 2003-08-19
  • 打赏
  • 举报
回复
当然起作用了
select distinct id from t
lang11zi 2003-08-19
  • 打赏
  • 举报
回复
不可能
qwater 2003-08-19
  • 打赏
  • 举报
回复
先用outer join 生成一个视图后,再直接用select distinct XXX from view1
bushido 2003-08-19
  • 打赏
  • 举报
回复
help too

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧