从列段中提取。。。。。
If not object_id('[tb]') is null
Drop table [tb]
Go
Create table [tb]([Num] int,[Count2] int,[Code] varchar(10))
Insert tb
Select 92126,200,'100202' union all
Select 94752,100,'100202' union all
Select 19,200,'100201' union all
Select 20,100,'100201'
Go
--Select * from tb
要求结果:把表中的num的后四位作为新的num
比如2126就生成21-26的6个num
/*
num Count2 code
----------- ----------- ----------
21 200 100202
22 200 100202
23 200 100202
24 200 100202
25 200 100202
26 200 100202
47 100 100202
48 100 100202
49 100 100202
50 100 100202
51 100 100202
52 100 100202
19 200 100201
20 100 100201
(14 行受影响)
*/
Drop table [tb]
Go
Create table [tb]([Num] int,[Count2] int,[Code] varchar(10))
Insert tb
Select 92126,200,'100202' union all
Select 94752,100,'100202' union all
Select 19,200,'100201' union all
Select 20,100,'100201'
Go
--Select * from tb
要求结果:把表中的num的后四位作为新的num
比如2126就生成21-26的6个num
/*
num Count2 code
----------- ----------- ----------
21 200 100202
22 200 100202
23 200 100202
24 200 100202
25 200 100202
26 200 100202
47 100 100202
48 100 100202
49 100 100202
50 100 100202
51 100 100202
52 100 100202
19 200 100201
20 100 100201
(14 行受影响)
*/
...全文
相关推荐
python3读取excel文件只提取某些行某些列的值方法
pandas的`read_excel`函数可以直接读取Excel文件并提供强大的数据筛选功能,可以轻松地根据条件提取特定行和列。
另一款8段LED段码提取软件
软件的核心功能是帮助用户轻松地处理8段LED的段码问题。具体来说,它提供了以下几大特性:1. **自定义段列**:用户可以根据实际的硬件设计自由定义8段LED的每一列连接方式。
活跃ip段提取
活跃ip段提取
IP段提取工具无捆绑无后门无病毒
本文将详细介绍一款名为“IP段提取工具无捆绑无后门无病毒”的软件,它能够帮助用户安全地提取IP地址段,同时确保用户的计算机免受恶意软件的侵扰。
8段数码管段码提取工具
段码提取工具是专为8段数码管设计的软件工具,它的主要功能是将要显示的数字或字符转换成对应的段码值。


应用实例
