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

推荐订阅源

G
Google Developers Blog
Google DeepMind News
Google DeepMind News
Hugging Face - Blog
Hugging Face - Blog
D
Docker
F
Fortinet All Blogs
博客园 - 三生石上(FineUI控件)
Project Zero
Project Zero
Engineering at Meta
Engineering at Meta
J
Java Code Geeks
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Simon Willison's Weblog
Simon Willison's Weblog
S
Security Affairs
NISL@THU
NISL@THU
T
Tor Project blog
A
About on SuperTechFans
宝玉的分享
宝玉的分享
腾讯CDC
S
Schneier on Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Privacy & Cybersecurity Law Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
P
Privacy International News Feed
雷峰网
雷峰网
C
Cyber Attacks, Cyber Crime and Cyber Security
Vercel News
Vercel News
Cisco Talos Blog
Cisco Talos Blog
D
DataBreaches.Net
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Google Online Security Blog
Google Online Security Blog
Recorded Future
Recorded Future
L
LINUX DO - 热门话题
Microsoft Security Blog
Microsoft Security Blog
Latest news
Latest news
C
Check Point Blog
有赞技术团队
有赞技术团队
T
The Exploit Database - CXSecurity.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
云风的 BLOG
云风的 BLOG
SecWiki News
SecWiki News
Application and Cybersecurity Blog
Application and Cybersecurity Blog
爱范儿
爱范儿
月光博客
月光博客
V
Vulnerabilities – Threatpost
T
Threat Research - Cisco Blogs
P
Palo Alto Networks Blog
T
The Blog of Author Tim Ferriss
C
Cisco Blogs
Webroot Blog
Webroot Blog
S
Security @ Cisco Blogs

博客园 - Arthur_wuancheng(大步牛)

练手之作:易元威客任务发布系统(2) 练手之作:易元威客任务发布系统(1) 人生一世 草木一秋 如何进行高效的项目管理?(转) 项目管理的一点总结 极限编程法一点思考 WEB Service 下实现大数据量的传输 (转) 项目经验(转) Atlas 学习笔记: ajax 改进 by Atlas ajax for .net in vs2003 like gmail ^_^ C# 2.0 New Feature(1) WebService Enhancements 2.0 Learning Note ref type & out type Duwamish架构分析篇 (转) 程序编码应保持良好的规范(C#)(转) 也谈代码规范 (转) 如何用正确的方法来写出质量好的软件的75条体会 [转] How to Write to Database by EnterPriseLibrary2005 Logging Application Block(项目心得) 自己正在做电信的互联星空项目,里面用到的xml
存储过程分页,以及动态sql(Sql server)
Arthur_wuancheng(大步牛) · 2005-12-14 · via 博客园 - Arthur_wuancheng(大步牛)

/*
CopyRight  2005 www.zte.com.cn  All rights reserved.
系统名称  :互联星空
子系统名称:资源管理子系统
描述      :检索SP订购关系列表
作者      :吴岸城
创建日期  :2005-12-13
*/

alter procedure dbo.Up_Res_SearchSPOrderInfo
(
 @SPID varchar(60),
 @ServiceID varchar(60),
 @UserID varchar(60), 
 @SubscriptionDate varchar(60),
 @SubscriptionDateEnd varchar(60),
 @Status varchar(60) ,
 @CountOnePage int,
 @Pages int
)
as
declare @SqlString nvarchar(1000)

set  @SqlString =' SELECT TOP '+@CountOnePage+' a.TxID, a.UserID, a.ChargeID, a.SPID, a.ServiceID, a.SubscriptionDate,
 a.BeginDate, a.EndDate, a.Status, b.SPName, b.ServiceName
 FROM   spms_ServiceSubscription a LEFT OUTER JOIN
   vwResourceSPService b ON a.ServiceID = b.ServiceID
 
 WHERE   (b.ServiceID>(SELECT MAX(b.ServiceID)FROM
   (SELECT TOP '+@Pages+' b.ServiceID FROM spms_ServiceSubscription a LEFT OUTER JOIN
     vwResourceSPService b ON a.ServiceID = b.ServiceID ORDER BY b.ServiceID)
  AST)) '

if (@SPID is not null and @SPID<>'')
set @SqlString=@SqlString+' and a.SPID = @SPID '

if (@ServiceID is not null and @ServiceID<>'')
set @SqlString=@SqlString +' and a.ServiceID = @ServiceID '

if (@UserID is not null and @UserID<>'')
set @SqlString=@SqlString +' and a.UserID = @UserID '

if (@Status is not null and @Status<>-1)
set @SqlString=@SqlString +' and a.Status = @Status '

if (@SubscriptionDate is not null) and (@SubscriptionDate <> '')
 set @SqlString = @SqlString + ' and a.SubscriptionDate >= ''' + @SubscriptionDate + ' 00:00:00'''
  
if (@SubscriptionDateEnd is not null) and (@SubscriptionDateEnd <> '')
 set @SqlString = @SqlString + ' and a.SubscriptionDate <= ''' + @SubscriptionDateEnd + ' 23:59:59'''

EXEC sp_executesql @SqlString
RETURN

posted on 2005-12-14 16:53  Arthur_wuancheng(大步牛)  阅读(290)  评论()    收藏  举报