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原创,版权私有,翻载必纠。欢迎交流,转载,但要在页面明显位置给出原文连接。谢谢。
查看全文
相关阅读:
linux的文件权限分析
Bash 文件夹操作
bash shell 文本文件操作
Vim文字编辑
Windows环境Vim编辑器如何执行Ruby代码
JavaWeb-Servlet
app遮罩层--网赚
flex布局 居中
实现绝对定位元素水平垂直居中的两种方法
CSS背景图怎么自适应全屏(手机或者电脑)
原文地址:https://www.cnblogs.com/newsea/p/528332.html
最新文章
isEqual ,判断两个对象或变量是否相等
获取一个对象的长度
vue之placeholder中引用字体图标
阿里字体图标使用方法
vux安装
Jquery中children与find之间的区别
mysql 加锁处理分析
DB2 数据库权限
fcntl和flock两个系统调用的区别
gdb Debug
热门文章
Keepalived 安装
tcp 出现rst情况整理
select示例
RPC
pkg-config
libtool
linux dev设备
linux的文件布局
ubuntu默认用户分析
linux用户登录
Copyright © 2011-2022 走看看