posts - 58,  comments - 121,  trackbacks - 30
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 
posted on 2007-01-11 14:09 datasky 阅读(4007) 评论(16)  编辑 收藏 网摘 所属分类: Sql Server

FeedBack:
2007-12-14 19:46 | ryuucyoukei [未注册用户]
ELSEが必要じゃない
  回复  引用    

标题  
姓名  
主页
Email (博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
Google站内搜索


China-pub 计算机图书网上专卖店!6.5万品种 2-8折!
近千种 9-95 新二手计算图书火热销售中!

相关文章:

相关链接:


 

欢迎加入Asp.net高手MSN群

  • asp.net.group#hotmail.com
  • asp.net_group#hotmail.com

与我联系

搜索

 

常用链接

留言簿

我管理的小组

我的标签

随笔分类(71)

相册

blogs链接

积分与排名

  • 积分 - 35317
  • 排名 - 1299

最新评论