zoukankan
html css js c++ java
SQLServer中 多行合成一行 的方法.
多行合并成一行.
declare
@tab
table
(id
int
)
declare
@i
int
declare
@str
varchar
(
300
)
select
@i
=
0
,
@str
=
'
[
'
while
@i
<
20
begin
insert
into
@tab
select
@i
select
@i
=
@i
+
1
end
select
@str
=
@str
+
cast
(id
as
varchar
)
+
'
,
'
from
@tab
select
@str
=
substring
(
@str
,
1
,
len
(
@str
)
-
1
)
+
'
]
'
select
@str
参见:
一行折分成多行:
http://www.cnblogs.com/newsea/archive/2006/10/19/533285.html
作者:
NewSea
出处:
http://newsea.cnblogs.com/
QQ,MSN:
iamnewsea@hotmail.com
如无特别标记说明,均为NewSea原创,版权私有,翻载必纠。欢迎交流,转载,但要在页面明显位置给出原文连接。谢谢。
查看全文
相关阅读:
11.分类与监督学习,朴素贝叶斯分类算法
14 深度学习-卷积
13-垃圾邮件分类2
12.朴素贝叶斯-垃圾邮件分类
9、主成分分析
8、特征选择
7.逻辑回归实践
6.逻辑归回
5.线性回归算法
15 手写数字识别-小数据集
原文地址:https://www.cnblogs.com/newsea/p/528332.html
最新文章
每周感想及阅读内容
每周感想及阅读内容
总结
总结
周总结
周总结
周总结(第九周)
周总结(第七周)
周总结(第六周)
合作成功的案例
热门文章
python3 协程
python3 @classmethod 和 @staticmethod 的区别
python3 super().__init__() 和 __init__() 的区别
Python3 继承
python3 __mian和__name__的区别
Python IO编程 序列化
python3 枚举enum定义和使用
python3 高级编程(三) 使用@property
python3 高级编程(二) 动态给类添加方法功能
python3 高级编程(一) 使用__slots__
Copyright © 2011-2022 走看看