易截截图软件、单文件、免安装、纯绿色、仅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   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 ......

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

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

db2\infomix\oralce\sqlserver选择指定条数语句

选择指定条数语句:
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 ......

SqlServer游标理解

游标操作的六步骤:
 ◆在每次在创建游标的时候都问问自己,用什么别的方法可以避免使用游标,那么你就步如设计的正规了.
    1.声明
    2.打开
    3.应用/操作
    4.关闭.
    5.释放
  &nbs ......

[引]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号