SELECT DISTINCT 1列 [英] SELECT DISTINCT 1 column

查看:197
本文介绍了SELECT DISTINCT 1列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我正试图使用​​asp& amp;显示来自访问数据库的记录

i只想要明确只适用于其中一个栏目


productname(x)例如


产品名称| productID | productDesc |价钱 。 。 。

x | 1 | fdsfdsfsf | 20

x | 2 | weew34 | 40

x | 3 | zxcvwf4 | 60

x | 4 | asqw34 | 30

y | 5 | weew34 | 40

y | 6 | zxcvwf4 | 50

y | 7 | asqw34 | 30


只想显示值x一个'

Hi i''m trying to display record from access db using asp &
i just want the distinct only apply to one of the columns which is

productname ( x ) For example

productname | productID | productDesc | price . . .
x | 1 | fdsfdsfsf | 20
x | 2 | weew34 | 40
x | 3 | zxcvwf4 | 60
x | 4 | asqw34 | 30
y | 5 | weew34 | 40
y | 6 | zxcvwf4 | 50
y | 7 | asqw34 | 30

only want to show value x one''s

展开 | 选择 | Wrap | 行号

推荐答案

如果你想要一个ASP解决方案,它会检查该列的值并打印记录,然后继续下一行,只有在下一行与前一行不同时才打印。但听起来你可能想要一个数据库解决方案,虽然我非常擅长SQL,但我建议在其中一个数据库论坛上发帖。


Jared
If you want an ASP solution, it would check the value of that column and print the record, then go on to the next row and only print if the next row is different from the previous. But it sounds like you might want a db solution, and although I''m pretty good at SQL, I would suggest posting in one of the db forums.

Jared


我正在尝试使用asp& amp;来显示来自访问数据库的记录

i只想要一个适用于其中一列的独特函数


productname(x)例如
Hi i''m trying to display record from access db using asp &
i just want the distinct function that apply to one of the columns which is

productname ( x ) For example
展开 | 选择 | Wrap | 行号


您好,感谢您的回复


我只是将其发布到访问表单

这里是链接
http:/ /bytes.com/topic/access/answer...tinct-1-column


任何人都知道如何访问它?
$ b $它'''使用一组?其他什么?


Thx为您提前回复

Fary
Hi thank for your kindly reply

i''ve just post it to access form too
here is the link
http://bytes.com/topic/access/answer...tinct-1-column

any body have know how to access it ?
it''s using a group by ? something else ?

Thx for you reply in advance
Fary


这篇关于SELECT DISTINCT 1列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆