求sql语句
pln_id netnode_id
1 2
2 3
1 3
2 4
我 想把 pln_id 相同的项变成 一行
就是
1 2 3
2 3 4
请指教
是这个吗
select pln_id,replace(wm_concat(netnode_id),',',' ')netnode_id
from tt
group by pln_id
还是说每个值以一列显示,比如你的例子结果里有3个字段?
还是说每个值以一列显示,比如你的例子结果里有3个字段
就是这个意思啊。
如需要阅读该回复,请登录或注册CSDN!
相关问答:
with adod_dict do
begin
close;
commandtext:='select bgqxcode,count(*) wjsl from wscl_wsda_file where wjnd=:tnd group by bgqxcode'; ......
两种错误:
1.如果我这样申明:ResultSet rs;错误提示如下:
An error occurred at line: 51 in the jsp file: /index.jsp
The local variable rs may not have been initialized
48: ......
PB中开发的。
DateTime startTime=DateTime(em_1.Text)
DateTime endTime=DateTime(em_2.Text)
string sql
sql = dw_1.GetSQLSelect()+"Where (StartTime> '"+startTime+&q ......
DateTime startTime=DateTime(em_1.Text)
DateTime endTime=DateTime(em_2.Text)
string sql
sql = dw_1.GetSQLSelect()+"Where (StartTime> '"+startTime+"') and (EndTime ......
小弟最近遇到一个问题,要求得出哪个班级的教师待遇最高,把同一个班级的教师待遇合计起来
班级表 教师表
班级ID & ......