22,209
社区成员
发帖
与我相关
我的任务
分享
if object_id('tempdb.dbo.#temp') is not null drop table #temp
go
create table #temp([前区胆码]nvarchar(20),[前区拖码] nvarchar(100),[后区胆码] nvarchar(50),[后区拖码] nvarchar(100))
insert #temp
select '10' ,'01 02 03 04 05 06 07 08 09 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35','','01 02 03 04 05 06 07 08 09 10 11
12'union all
select '10 28' ,'01 02 03 04 05 06 07 08 09 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35','03','05 07 09 10 12'union all
select '03 10 28' ,'01 02 04 05 06 07 08 09 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35','12','01 02 03 05 07 09 11'union all
select '06 07 10 28' ,'01 02 03 04 05 08 09 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35','12','01 02 05 08 09'union all
select '' ,'01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35','','05 09'
--------------生成数据--------------------------
消息 8152,级别 16,状态 4,第 1 行
将截断字符串或二进制数据。
语句已终止。
if object_id('tempdb.dbo.#temp') is not null drop table #temp
go
create table #temp([前区胆码]nvarchar(20),[前区拖码] nvarchar(200),[后区胆码] nvarchar(50),[后区拖码] nvarchar(100))
insert #temp
select '10' ,'01 02 03 04 05 06 07 08 09 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35','','01 02 03 04 05 06 07 08 09 10 11 12'union all
select '10 28' ,'01 02 03 04 05 06 07 08 09 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35','03','05 07 09 10 12'union all
select '03 10 28' ,'01 02 04 05 06 07 08 09 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35','12','01 02 03 05 07 09 11'union all
select '06 07 10 28' ,'01 02 03 04 05 08 09 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35','12','01 02 05 08 09'union all
select '' ,'01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35','','05 09'
--------------生成数据--------------------------
if object_id('tempdb.dbo.#temp') is not null drop table #temp
go
create table #temp([前区胆码]nvarchar(20),[前区拖码] nvarchar(100),[后区胆码] nvarchar(50),[后区拖码] nvarchar(100))
insert #temp
select '10' ,'01 02 03 04 05 06 07 08 09 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35','','01 02 03 04 05 06 07 08 09 10 11
12'union all
select '10 28' ,'01 02 03 04 05 06 07 08 09 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35','03','05 07 09 10 12'union all
select '03 10 28' ,'01 02 04 05 06 07 08 09 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35','12','01 02 03 05 07 09 11'union all
select '06 07 10 28' ,'01 02 03 04 05 08 09 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35','12','01 02 05 08 09'union all
select '' ,'01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35','','05 09'
--------------生成数据--------------------------