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

推荐订阅源

J
Java Code Geeks
GbyAI
GbyAI
阮一峰的网络日志
阮一峰的网络日志
Cloudbric
Cloudbric
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
I
Intezer
Simon Willison's Weblog
Simon Willison's Weblog
博客园_首页
The Cloudflare Blog
C
Cisco Blogs
AWS News Blog
AWS News Blog
IT之家
IT之家
Cyberwarzone
Cyberwarzone
罗磊的独立博客
美团技术团队
V
V2EX
Project Zero
Project Zero
A
Arctic Wolf
C
Cyber Attacks, Cyber Crime and Cyber Security
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 聂微东
有赞技术团队
有赞技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
雷峰网
雷峰网
S
Schneier on Security
P
Privacy International News Feed
V
Visual Studio Blog
量子位
T
Tor Project blog
S
Securelist
腾讯CDC
A
About on SuperTechFans
T
Threat Research - Cisco Blogs
G
GRAHAM CLULEY
B
Blog RSS Feed
D
DataBreaches.Net
博客园 - 三生石上(FineUI控件)
B
Blog
NISL@THU
NISL@THU
L
Lohrmann on Cybersecurity
V
Vulnerabilities – Threatpost
人人都是产品经理
人人都是产品经理
博客园 - 【当耐特】
L
LINUX DO - 热门话题
Recorded Future
Recorded Future

博客园 - 戴玮

关于状态模式的思考 实在是忍受不了MSN的巨慢速度,重新换个地方 如果在网页中实现查找功能 asp.net2.0 页面生命周期方法 C#加密与解决 如何自定义一个模板列,并在后台加载 ASP.NET常用的代码集合 - 戴玮 - 博客园 ADO.NET2.0分页 - 戴玮 - 博客园 如何查找 Office Web 组件 (OWC) 编程文档和示例 如何将枚举定义翻译成DataTable 网页中调用MSN添加好友工具 如何在XP SP2下面使用DTC Javascript 复制与粘贴 - 戴玮 - 博客园 如何在Component中取得Page对象 使用TransactionScope进行COM+事务处理 - 戴玮 - 博客园 如何在C#中使用EVAL方法 - 戴玮 - 博客园 巨NB的JAVASCRIPT代码 - 戴玮 - 博客园 9月25日C#->WebService中如何传递文件 解决了一年多的问题,狂喜(一年之前)
触发器示例代码
戴玮 · 2006-11-15 · via 博客园 - 戴玮

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

ALTER       trigger SalesOrderD_T_Checking on dbo.SalesOrderD
for insert , update
as
declare @a int

if exists(select * from inserted
inner join SalesOrderH on inserted.ReceiptCode = SalesOrderH.ReceiptCode
where not exists(select * from CustProd
where CustProd.CustomerCode = SalesOrderH.CustomerCode 
and CustProd.CustomerType = SalesOrderH.CustomerType
and CustProd.TradingConditionCode = SalesOrderH.TradingConditionCode
and CustProd.ItemNo = inserted.ItemNo))

begin

raiserror('Save error ! , You do not insert Item which is not in Customer Product List .',16,1)
end

--raiserror('DaiWei is stupid ! ,  .',16,1)

/*
select CustomerCode,CustomerType,TradingConditionCode,ItemNo from SalesOrderD
inner join SalesOrderH on SalesOrderD.ReceiptCode = SalesOrderH.ReceiptCode
where not exists(select * from CustProd
where CustProd.CustomerCode = SalesOrderH.CustomerCode 
and CustProd.CustomerType = SalesOrderH.CustomerType
and CustProd.TradingConditionCode = SalesOrderH.TradingConditionCode
and CustProd.ItemNo = SalesOrderD.ItemNo)

select * from custprod where CustomerCode = 'TZ'
*/

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO