create proc UInfo(@Uid varchar(36))
          as
          begin
          declare @ResultDt table(cname varchar(64),acount int,ccount int,scount int)
          set @Uid='simao'
          declare  @tempcount int
          insert into @ResultDt select
          '商鋪 ',(select count(1) from ShopOffice where UID=@Uid),(select count(1) from ShopOffice where SCommand=1 and UID=@Uid),(select count(1) from ShopOffice where NStatus=3 and UID=@Uid)
          insert into @ResultDt select
          '寫字樓',(select count(1) from OfficeBuilding where UID=@Uid),(select count(1) from OfficeBuilding where SCommand=1 and UID=@Uid),(select count(1) from OfficeBuilding where NStatus=3 and UID=@Uid)
          insert into @ResultDt select
          '工業地產',(select count(1) from Industrial where UID=@Uid),(select count(1) from Industrial where SCommand=1 and UID=@Uid),(select count(1) from Industrial where NStatus=3 and UID=@Uid)
          insert into @ResultDt select
          '大型項目',(select count(1) from Project where UID=@Uid),(select count(1) from Project where SCommand=1 and UID=@Uid),(select count(1) from Project where NStatus=3 and UID=@Uid)
          insert into @ResultDt select
          '生意轉讓',(select count(1) from Bussiness where UID=@Uid),(select count(1) from Bussiness where SCommand=1 and UID=@Uid),(select count(1) from Bussiness where NStatus=3 and UID=@Uid)
          insert into @ResultDt select
          '合計',sum(acount),sum(ccount),sum(scount) from @ResultDt
          select * from @ResultDt
          end
          posted on 2010-10-15 00:15 sanmao 閱讀(718) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 广平县| 梓潼县| 留坝县| 姚安县| 资溪县| 石狮市| 沙湾县| 泸水县| 永州市| 古浪县| 南昌县| 塘沽区| 平凉市| 星座| 公主岭市| 富平县| 临夏市| 和林格尔县| 革吉县| 安西县| 兴义市| 姚安县| 彭山县| 孟连| 成安县| 黑龙江省| 陆丰市| 滕州市| 新干县| 收藏| 体育| 新乡县| 黄浦区| 长顺县| 泰来县| 夹江县| 河北省| 嘉兴市| 彰化市| 衡阳市| 新乐市|