sqlserver 2005 split function
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
create function [dbo].[split](@str nvarchar(1000),@word varchar(5),@no
int) returns nvarchar(500)
as begin
declare @len int
declare @index int
set @index=charindex(@word,@str)
set @index=len(@word)+@index-1
set @len=len(@str)
if @index >0 and @no=2
return substring(@str,@index+1,@len)
else if @index>0 and @no=1
return substring(@str,0,@index-len(@word)+1)
return @str
end
相关文档:
select identity(int,1,1) as col_id , * into temp from uep.dbo.A_experiment
select * from temp where col_id between 50 and 60
drop table temp ......
如何开启SQLSERVER数据库缓存依赖优化网站性能
数据库, 缓存, SQLSERVER, 性能
很多时候,我们服务器的性能瓶颈会是在查询数据库的时候,所以对数据库的缓存非常重要,那么有没有一种方法,可以实现SQL SERVER数据库的缓存,当数据表没有更新时,就从缓存中读取,当有更新的时候,才从数据表中读取呢,答案是肯定的,这 ......
选择指定条数语句:
db2:select * from tabname fetch frist n rows only
informix:select first n *
from tabname
oralce:select * from tabname where rownum <= n
sql server :select top n * from tabname ......
http://www.tongyi.net/article/20031101/200311013786.shtml
所谓的数据传输,其实是指SQLServer访问Access、Excel间的数据。
为什么要考虑到这个问题呢?
由于历史的原因,客户以前的数据很多都是在存入在文本数据库中,如Acess、Excel、Foxpro。现在系统升级及数据库服务器如SQLServer、ORACLE后,经常需要访问文本数 ......