易截截图软件、单文件、免安装、纯绿色、仅160KB

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


相关文档:

SqlServer 的几种分页方式


方式一:
select top 200 * from view_OrganResource
where  1=1 and OrganID = 57 and
(OrderID not in(select top 1000 OrderID from tb_OrganResource
where  1=1 and  OrganID = 57 order by uploadtime desc))
order by uploadtime desc --5858 1980
方式二:
select top 200 * from
vi ......

简单的3个SQL视图搞定所有SqlServer数据库字典 转

数据库字典包括表结构(分2K和2005)、索引和主键.外键.约束.视图.函数.存储过程.触发器.规则。可以在企业管理器、查询分析器中简单执行,直接了当的查出SQL2K及SQL2005的所有数据字典,方便文档的编写,希望对大家有帮助。
1. SqlServer2000数据库字典--表结构.sql
SELECT TOP 100 PERCENT --a.id,
   & ......

如何开启SQLSERVER数据库缓存依赖优化网站性能


如何开启SQLSERVER数据库缓存依赖优化网站性能
数据库, 缓存, SQLSERVER, 性能
很多时候,我们服务器的性能瓶颈会是在查询数据库的时候,所以对数据库的缓存非常重要,那么有没有一种方法,可以实现SQL SERVER数据库的缓存,当数据表没有更新时,就从缓存中读取,当有更新的时候,才从数据表中读取呢,答案是肯定的,这 ......

[引]SQLServer和Access、Excel数据传输简单总结

http://www.tongyi.net/article/20031101/200311013786.shtml
所谓的数据传输,其实是指SQLServer访问Access、Excel间的数据。
为什么要考虑到这个问题呢?
由于历史的原因,客户以前的数据很多都是在存入在文本数据库中,如Acess、Excel、Foxpro。现在系统升级及数据库服务器如SQLServer、ORACLE后,经常需要访问文本数 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号