注銷

          注銷

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            112 隨筆 :: 7 文章 :: 18 評論 :: 0 Trackbacks

          /*
          ?exec IbComAddress_Select 1,8,1,1
          */

          SET QUOTED_IDENTIFIER OFF
          GO
          SET ANSI_NULLS OFF
          GO

          ALTER? PROCEDURE IbComAddress_Select??

          ? @CreatedUserID int,
          ? @pagesize int,
          ? @pageindex int,
          ? @docount int

          ? AS
          ?? set nocount on
          ?? declare @strSql varchar(3000)
          ?? if(@docount=1)
          ??? begin
          ????
          ?????? set @strSql='Select count(*) from '
          ?????????????????? +'(select?? CustomerName , phone,'' HomePhone,'' Mobile from? CustomerInfomation? where? CreatedUserID='+cast(@CreatedUserID as varchar(50))+
          ???????????????????????? ' union all? select [Name],JobPhone,HomePhone,Mobile from? CustomerContactor? where? CreatedUserID='+cast(@CreatedUserID as varchar(50))+')a'

          ? print @strSql???
          ?--exec(@strSql)????

          ??? end
          ? else
          ???? begin
          ???????? declare @indextable table(id int identity(1,1),nid int,CustomerName varchar(50),phone varchar(50),HomePhone varchar(50),Mobile varchar(50))--聲明臨時表
          ???????? declare @PageLowerBound int
          ???????? declare @PageUpperBound int
          ???????? set @PageLowerBound=(@pageindex-1)*@pagesize
          ???????? set @PageUpperBound=@PageLowerBound+@pagesize
          ???????? set rowcount @PageUpperBound
          ???????
          ???????? insert into @indextable(nid,CustomerName,phone,HomePhone,Mobile)
          ????????

          ???????? select CustomerID,? CustomerName , phone,'' HomePhone,'' Mobile from? CustomerInfomation? where? CreatedUserID=@CreatedUserID?
          ???????? union all
          ???????? select CustomerID, [Name],JobPhone,HomePhone,Mobile from? CustomerContactor? where? CreatedUserID=@CreatedUserID
          ????????
          ???????? select * from @indextable t where t.id>@PageLowerBound and t.id <=@PageUpperBound order by t.id
          ????? end
          ??


          GO
          SET QUOTED_IDENTIFIER OFF
          GO
          SET ANSI_NULLS ON
          GO

          ?

          posted on 2006-12-06 11:31 注銷..... 閱讀(151) 評論(0)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 平阴县| 龙口市| 伊通| 郸城县| 三原县| 四会市| 牡丹江市| 乌鲁木齐市| 军事| 政和县| 马公市| 桓台县| 新田县| 富锦市| 板桥市| 龙山县| 许昌市| 且末县| 会泽县| 那坡县| 梁河县| 稻城县| 禹城市| 松潘县| 莱阳市| 临江市| 西乌| 巨野县| 无极县| 甘泉县| 灵山县| 醴陵市| 文成县| 凌源市| 五华县| 崇信县| 泉州市| 巧家县| 措勤县| 武城县| 郸城县|