惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
博客园_首页
H
Help Net Security
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
B
Blog
I
InfoQ
SecWiki News
SecWiki News
T
Tailwind CSS Blog
Spread Privacy
Spread Privacy
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
P
Palo Alto Networks Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Vercel News
Vercel News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
Kaspersky official blog
M
MIT News - Artificial intelligence
S
Schneier on Security
T
Threat Research - Cisco Blogs
F
Fortinet All Blogs
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
The Cloudflare Blog
Recent Announcements
Recent Announcements
Security Latest
Security Latest
G
GRAHAM CLULEY
IT之家
IT之家
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
腾讯CDC
Google DeepMind News
Google DeepMind News
V
V2EX
S
Securelist
TaoSecurity Blog
TaoSecurity Blog
B
Blog RSS Feed
S
SegmentFault 最新的问题
博客园 - 叶小钗
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Project Zero
Project Zero
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure

博客园 - 馒头

加载安卓SDK失败的办法 WCF服务端配置容易被忽略的细节问题 对 wcf 的安全机制传输安全的疑惑求教 [转].net试用分布式数据库事务com+ [转].net下跨数据分布式事务的处理办法TransactionScope [转]Page的生存周期 [转]如何获得动态添加的html控件的值 - 馒头 - 博客园 如何在客户端清除fileUpLoad控件的文件路径 - 馒头 - 博客园 来自朋友的关爱 T_Sql之Str()和Cast .net word编程对象简介 .Net将数据导出Word Oracle 与SQL Server 2000常用函数对照 [摘抄] 项目中除了需求外还需要知道的问题 .net调用数据库存储过程应当注意的问题 [转]Asp.Net下导出/导入规则的Excel(.xls)文件 [转]常用表达式 [转]ASP.NET提供文件下载函数 [转]项目的成败
如何向存储过程传送数组
馒头 · 2007-03-20 · via 博客园 - 馒头

方案1
Declare @Technic varchar(800)
Declare @CurrentIndex int
Declare @NextIndex int
Declare @TechnicCondtion varchar(1000)

Set @Technic='1,2,3,4,5,6,7,89,10,'
Set @CurrentIndex=1

print len(@Technic)

Set @CurrentIndex=CharIndex(',',@Technic)
Set @NextIndex=CharIndex(',',@Technic,@CurrentIndex+1)

-- Select @CurrentIndex,@NextIndex
-- Select Substring(@technic,@CurrentIndex+1,@NextIndex-@CurrentIndex-1)

Set @TechnicCondtion=' And Technic='+SubString(@Technic,0,@CurrentIndex)

while(@NextIndex<Len(@Technic))
Begin
 Set @NextIndex=CharIndex(',',@Technic,@CurrentIndex+1)
 Print  @NextIndex
 print @CurrentIndex
 Set @TechnicCondtion=@TechnicCondtion+' And Technic='+Substring(@technic,@CurrentIndex+1,@NextIndex-@CurrentIndex-1)
 Set @CurrentIndex=@NextIndex

 
 print @TechnicCondtion
End

Select @TechnicCondtion

方案2

Set TechnicCondtion='In '+SubString(@Technic,Len(@Technic),Len(@Technic)-1)