日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

解讀SQL中自己創(chuàng)建函數(shù) 分割字符串(3)_Mssql數(shù)據(jù)庫(kù)教程

編輯Tag賺U幣
教程Tag:暫無(wú)Tag,歡迎添加,賺取U幣!

推薦:解讀SQL Server 2008可用性
基于磁盤(pán)的備份 首先來(lái)看的是最簡(jiǎn)單的技術(shù)——備份。在SQL Server 2008的企業(yè)版中,備份有了一個(gè)新的特性,那就是備份壓縮。那么備份壓縮對(duì)于高可用有什么幫助呢?

以下為引用的內(nèi)容:

 select @location = charindex(@splitstr,@str,@start) 

  select @next = @next 1

  select @int_return = @next

   end

   return @int_return

  end

  GO

  SET QUOTED_IDENTIFIER OFF

  GO

  SET ANSI_NULLS ON

  GO

  SET QUOTED_IDENTIFIER ON

  GO

  SET ANSI_NULLS ON

  GO

  -- getstrofindex 輸入一個(gè)未分割的字符串,舒服分割符號(hào),舒服要取得的字符位置

 �。� 返回 制定位置的字符串

  CREATE  function getstrofindex (@str varchar(8000),@splitstr varchar(4),@index int=0) 

  returns varchar(8000) 

  as 

  begin 

  declare @str_return varchar(8000) 

  declare @start int 

  declare @next int 

  declare @location int

   select @start =1 

  select @next = 1 --如果習(xí)慣從0開(kāi)始則select @next =0 

  select @location = charindex(@splitstr,@str,@start) 

  while (@location <>0 and @index > @next )

   begin 

  select @start = @location  1 

  select @location = charindex(@splitstr,@str,@start) 

  select @next =@next  1 

  end

  if @location =0 select @location =len(@str) 1 --如果是因?yàn)闆](méi)有逗號(hào)退出,則認(rèn)為逗號(hào)在字符串后 

  select @str_return = substring(@str,@start,@location -@start) --@start肯定是逗號(hào)之后的位置或者就是初始值1 

  if (@index <> @next ) select @str_return = '' --如果二者不相等,則是因?yàn)槎禾?hào)太少,或者@index小于@next的初始值1�!�

 

  return @str_return 

  end

  GO

  SET QUOTED_IDENTIFIER OFF

  GO

  SET ANSI_NULLS ON

  GO

分享:關(guān)于SQL Server 2008中報(bào)表服務(wù)的詳解
一、導(dǎo)言 盡管公司經(jīng)常采集和存儲(chǔ)大量的數(shù)據(jù),但是有時(shí)還是難以詳盡地顯示數(shù)據(jù),而且也很難提供對(duì)商業(yè)中將發(fā)生什么的洞察以使商業(yè)決策者為公司作出相應(yīng)的和及時(shí)的決策。 為了能作

共3頁(yè)上一頁(yè)123下一頁(yè)
來(lái)源:模板無(wú)憂//所屬分類(lèi):Mssql數(shù)據(jù)庫(kù)教程/更新時(shí)間:2009-09-17
相關(guān)Mssql數(shù)據(jù)庫(kù)教程