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

Sql版本除去html并截取指定长度的字符串

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
Go
----截取字符串,并出去html
create FUNCTION [dbo].[CutString] (@str varchar(1000),@length int) 
RETURNS varchar(1000) AS 
BEGIN
 declare @mainstr varchar(1000)
 declare @substr varchar(1000)
 if(@str is not null or @str!='')
 begin
  set @mainstr=dbo.regexReplace(@str,'<[\w\W]*?>','',1,1)
  set @mainstr=dbo.regexReplace(@mainstr,'&[\w\W]*?;','',1,1)
  if len(@mainstr)<=@length
     set @substr=@mainstr
  else
     set @substr=substring(@mainstr,1,@length-2)+'..'
 end
 return @substr
END


相关文档:

【摘】Power Builder 中动态SQL语句的写法

PowerBuilder是目前最流行的数据库开发工具之一。PowerBuilder提供了在程序代码中加入嵌入式SQL语句的功能来支持对数据库的访问。但这种嵌入式SQL语句只能支持一些固定的标准的SQL语句,即在进行程序代码编译处理时这些SQL语句必须是确定的,例如:对哪张表哪几个字段进行操作在程序代码中是固定写明的,另外这种方式也不能 ......

[Sql Server2008]树结构的递归算法

本文主要讲述三个内容:
1.如何创建hierarychyid的表,插入数据及基本递归查询。
2.介绍hierarchyid的10种专有函数。
3.介绍hierarchyid特有的深度优先索引(Depth-First Indexing)和广度优先索引(Breadth-First Indexing)
在上一节中
http://blog.csdn.net/tjvictor/archive/2009/07/30/4395677.aspx
我们已经演 ......

html学习(常用属性)


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; char ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号