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

推荐订阅源

N
News and Events Feed by Topic
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
T
Threat Research - Cisco Blogs
Cloudbric
Cloudbric
Recent Commits to openclaw:main
Recent Commits to openclaw:main
I
Intezer
Attack and Defense Labs
Attack and Defense Labs
P
Privacy International News Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
Lohrmann on Cybersecurity
C
Cybersecurity and Infrastructure Security Agency CISA
V2EX - 技术
V2EX - 技术
AWS News Blog
AWS News Blog
O
OpenAI News
L
LINUX DO - 最新话题
N
News | PayPal Newsroom
PCI Perspectives
PCI Perspectives
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Troy Hunt's Blog
Latest news
Latest news
D
Darknet – Hacking Tools, Hacker News & Cyber Security
A
Arctic Wolf
Spread Privacy
Spread Privacy
G
GRAHAM CLULEY
T
Tor Project blog
博客园_首页
Know Your Adversary
Know Your Adversary
有赞技术团队
有赞技术团队
S
Secure Thoughts
美团技术团队
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
T
Tailwind CSS Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
V
Visual Studio Blog
J
Java Code Geeks
Cisco Talos Blog
Cisco Talos Blog
Schneier on Security
Schneier on Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Security Affairs
Jina AI
Jina AI
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
宝玉的分享
宝玉的分享
量子位
Last Week in AI
Last Week in AI
月光博客
月光博客
罗磊的独立博客
S
SegmentFault 最新的问题

博客园 - 黄永泰

extern修饰符的使用(C#) .NET Framework 4与.NET Framework 4 Client Profile 的区别? 《C#与.NET 4高级程序设计:第5版》这本书如何? *.docx文件打开方法 试图运行项目时出错,无法启动调试。没有正确安装调试器,请运行安装程序安装或恢复调试器。 System.ArgumentException: 另一个SqlParameterCollection中已包含SqlParameter。 买了几本书。 给Visual Studio 2010换皮肤。 请教一个程序自动升级的写法. 支持掘金,支持"甜瓜"安东尼. NBA 2009-10赛季赛程表 IList<T>、List<T>、BindingList<T>与dataGridView的绑定问题(请教)。 IList<T>、List<T>、BindingList<T>与dataGridView的绑定问题。 近期及今后一段时间的学习目标. 请教: sql server 中动态创建命令语句 大家继续努力! 近期.net学习计划。 谢谢大家的指教! 关于“我的藏书阁:.NET/数据库应用开发”的几点看法。
数据库从Sql server 2000升级到2005后,遇到一点问题。
黄永泰 · 2008-12-02 · via 博客园 - 黄永泰

不知哪位碰到这样的问题,请知道的朋友指数,谢谢!

我的数据库用的是sql server 2000,升级之前一切正常,但升级到2005后,一个存在过程在被调用运行的过程中出现了问题,而且是隔几天又没事,隔几天又出现问题,反反复复,真的奇怪。不行的时候提示的信息如下(在.net 2003和2008中都如此) 

“超时时间已到。在操作完成之前超时时间已过或服务器未响应。”

但把该存储过程的代码弄在查询窗口中运行又不会出现问题,真的是百思不得其解。

不知道是否.net代码在调用sql server 2005存储过程是不时要进行其它的处理,请知道的朋友指教,谢谢。存储过程的代码如下:

ALTER PROCEDURE dbo.JIT_Sha_Dairy_RptTemp_UseInRpt03_1

@dt1 as datetime,
@dt2 as datetime,
@CCode char(4)--,

AS

declare @weight_浅色 decimal(12,2)
declare @weight_中色 decimal(12,2)
declare @weight_深色 decimal(12,2)
declare @weight_漂白白色 decimal(12,2)

set @weight_浅色 = 0
set @weight_中色 = 0
set @weight_深色 = 0
set @weight_漂白白色 = 0

declare @WeightTable table
(
 weight_浅色 decimal(17,4),
 weight_中色 decimal(17,4),
 weight_深色 decimal(17,4),
 weight_漂白白色 decimal(17,4)
)

declare @dairyTable table
(
 客户编号 char(4),
 缸号 char(18),
 百分比总和 decimal(12,4),
 产量 decimal(12,2)
)

--以下统计染色
insert into @dairyTable
select
 d.CCode as 客户编号,
 b.Job_No as 缸号,
 sum(a.Baifenbi) as 百分比总和,
 avg(c.Weight_Dairy) as 产量
from Sha_Piaorandan1 a left outer join Sha_Piaorandan b
 on a.Piaoran_No = b.Piaoran_No
left outer join Sha_Paigang c on b.Job_No = c.Job_No
left outer join Contract_Total d on c.Cont_No = d.Cont_No
where
 c.Finish = 'Y'
 and c.Prod_Date between @dt1 and @dt2
 and a.RCode not like 'C%'
 and a.RCode <> ''
 and b.Piaoran_Type not in ('YBC','YBS') --漂白/YBC,半漂/YBS不参加进去,假设该单不领染料
group by d.CCode,b.Job_No

if @CCode <> ''
 delete @dairyTable where 客户编号 <> @CCode
 
select @weight_浅色 = sum(产量) * 0.9 from @dairyTable where 百分比总和 <= 1.5

select @weight_中色 = sum(产量) * 1 from @dairyTable where 百分比总和 > 1.5 and 百分比总和 <= 3.5

select @weight_深色 = sum(产量) * 1.35 from @dairyTable where 百分比总和 > 3.5

--以下统计漂白/YBC,半漂YBS
--先把之前的资料删除
delete @dairyTable

insert into @dairyTable
select
 d.CCode as 客户编号,
 b.Job_No as 缸号,
 sum(a.Baifenbi) as 百分比总和,
 avg(c.Weight_Dairy) as 产量
from Sha_Piaorandan1 a left outer join Sha_Piaorandan b
 on a.Piaoran_No = b.Piaoran_No
left outer join Sha_Paigang c on b.Job_No = c.Job_No
left outer join Contract_Total d on c.Cont_No = d.Cont_No
where
 c.Finish = 'Y'
 and c.Prod_Date between @dt1 and @dt2
 and b.Piaoran_Type in ('YBC','YBS') --漂白/YBC,半漂/YBS
group by d.CCode,b.Job_No

if @CCode <> ''
 delete @dairyTable where 客户编号 <> @CCode
 
select @weight_漂白白色 = sum(产量) * 0.6 from @dairyTable

insert into @WeightTable values(@weight_浅色, @weight_中色 , @weight_深色, @weight_漂白白色)

select * from @WeightTable