网络软件 系统工具 应用软件 图形图像 多媒体类 免费游戏 安全相关 免费音乐 网页素材 电子书籍 考试考题 建站源码
教育教学 多媒体类 编程开发 操作系统 游戏天地 娱乐天地 简历求职 站长专区 网页设计 安全技术 图形图像 文学驿站
业界资讯 | 图形图像 | 操作系统 | 网络冲浪 | 工具软件 | 办公软件 | 媒体动画 | 精文荟萃 | 认证考试 | 网页设计 | 技术开发 | 专栏
当前位置:热点网络学院技术开发.Net 专栏ASP.NET技巧SQL IF..ELSE..在存储过程的使用规范
精品推荐
热点TOP10
·使用asp.net发送邮件详解
·国内.NET论坛源代码不完全搜集
·精通ASP.NET中弹出窗口技术
·ASP.NET2.0下含有CheckBox的GridView删除选定记录实例
·将ASP.NET页面内的数据导出到Excel 或 Word中
·ASP.NET 2.0 多文件上传小经验
·ASP.NET 数据绑定常用代码
·ASP.Net防止刷新自动触发事件的解决方案
·使用ASP.NET2.0的ReportViewer查看RDLC报表
·ASP.NET程序中常用的三十三种代码
·关于asp.net c#中对cookie的操作
·关于ASP.NET调用JavaScript的实现
·保护你的DLL和Code不被别人使用
·Asp.Net函数集
·ASP.NET2.0新特性概述
·asp.net 2.0中加密web.config
·高级自定义查询、分页、多表联合存储过程
·ASP.NET2.0下利用javascript实现TreeView中的checkbox全选
·给.net初学者的一些建议(共勉之)
·使用WebClient自动填写并提交ASP.NET页面表单
SQL IF..ELSE..在存储过程的使用规范
日期:2007年1月15日 作者: 查看:[大字体 中字体 小字体]
CREATE PROCEDURE [dbo].[sp_stat_info]
(
@city nvarchar(20),
@town nvarchar(20),
@village nvarchar(20)
)
as
declare @num numeric(10)
declare @yd_num numeric(10)
declare @lt_num numeric(10)
declare @gh_num numeric(10)
declare @xlt_num numeric(10)
select @num=count(jmzh) from jfxd.t_gongan_end_2
if @city='aaa'
begin
select @yd_num=count(jmzh) from jfxd.t_gongan_end_2 where SERIAL_NUMBER is not null
select @lt_num=count(jmzh) from jfxd.t_gongan_end_2 where unicom is not null
select @gh_num=count(jmzh) from jfxd.t_gongan_end_2 where tel is not null
select @xlt_num=count(jmzh) from jfxd.t_gongan_end_2 where little_tel is not null
end
else if @town='bbb'
begin
//sql语句
end
else
begin
//sql语句
end
update t_stat_info set……
GO 

(出处:http://www.vipcn.com)

关于我们 | 帮助(?) | 版权声明 | 友情连接 
Copyright 2005-2005 viphot.com All Rights Reserved.
Powered by:mesky