由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - 用GROUP BY 时有没有string的function?
相关主题
Access database 求助Is "Dim mydb as database" a user-defined datatype
急问: 请问SQL适合做这种计算吗?how to write this query, need help !!
如何寫此 SQL 查詢?question
long and CLOB.. any differences?question for webdb guru
挖一大坑+奔Help about mysql
面试问题,关于oracle 8iSQL问题求救!!
老印给我的一个Challenge有关m# sql server text字段类型一问
Does MS SQL 7 support SQL3 Datatype?Questions about building a database(Maybe ACCESS?)
相关话题的讨论汇总
话题: group话题: met话题: english话题: math话题: coursename
进入Database版参与讨论
1 (共1页)
t****n
发帖数: 10724
1
用GROUP BY 时有没有string的function
当datatype是数时,可以用sum,max,min,average etc. 但似乎没有string的,还是
只能用cursor。
CourseName Comment
English Met
English Need more practice on writing
English Conference with parents
Math Met
Math Excellent
GROUP BY CourseName
想得到的结果是
CourseName Comment
English Met,Need more practice on writing,conference with parents
Math Met,Excellent
J********t
发帖数: 83
2
you can use XML PATH() to contenate records from one column in multiple
rows.
here is an example almost identical to your question:
http://forums.asp.net/t/1258217.aspx
c****7
发帖数: 366
3
Listagg

★ 发自iPhone App: ChineseWeb 7.7

【在 t****n 的大作中提到】
: 用GROUP BY 时有没有string的function
: 当datatype是数时,可以用sum,max,min,average etc. 但似乎没有string的,还是
: 只能用cursor。
: CourseName Comment
: English Met
: English Need more practice on writing
: English Conference with parents
: Math Met
: Math Excellent
: GROUP BY CourseName

t****n
发帖数: 10724
4
sql server 只能用STUFF - PATH, 是目前最好的方法,只是没有象oracle一样一个
LISTAPP简洁明了。

【在 J********t 的大作中提到】
: you can use XML PATH() to contenate records from one column in multiple
: rows.
: here is an example almost identical to your question:
: http://forums.asp.net/t/1258217.aspx

1 (共1页)
进入Database版参与讨论
相关主题
Questions about building a database(Maybe ACCESS?)挖一大坑+奔
the most stupid question面试问题,关于oracle 8i
My SQL question: auto increment老印给我的一个Challenge
image datatype in sql serverDoes MS SQL 7 support SQL3 Datatype?
Access database 求助Is "Dim mydb as database" a user-defined datatype
急问: 请问SQL适合做这种计算吗?how to write this query, need help !!
如何寫此 SQL 查詢?question
long and CLOB.. any differences?question for webdb guru
相关话题的讨论汇总
话题: group话题: met话题: english话题: math话题: coursename