sql server函数
来源:互联网 发布:网络驱动器 编辑:程序博客网 时间:2024/06/04 00:54
1、 函数
IF EXISTS (
SELECT *
FROM dbo.sysobjects
WHERE id = object_id(N'[dbo].[Get_II_list]')
AND xtype IN (N'FN', N'IF', N'TF')
)
DROP FUNCTION [dbo].[Get_II_list]
GO
CREATE FUNCTION Get_II_list
(
)
RETURNS varchar(800)
AS
BEGIN
DECLARE @s varchar(800)
SET @s=''
SELECT @s = ','+ISNULL(name,'')+@s
FROM II
IF(len(@s)>1)
SET @s=right(@s,len(@s)-1)
RETURN @s
END
Go
**********************************************************
SELECT dbo.Get_II_list()
---------------------结果---------------------------
Bin,jack,Hung,way,Danny
―――――――――――――――――
IF EXISTS(
SELECT * FROM dbo.sysobjects
WHERE id=OBJECT_ID(N'[dbo].[is_all_number]')
AND xtype IN (N'FN', N'IF', N'TF')
)
DROP FUNCTION [dbo].[is_all_number]
go
CREATE FUNCTION is_all_number(
@in varchar(10)
)
RETURNS integer
AS
BEGIN
DECLARE @i integer,
@l integer,
@c char
SET @l=len(@in)
IF(@l<=0)
RETURN 0
SET @i=1
WHILE(@i<=@l)
BEGIN
SET @c=substring(@in,@i,1)
IF (@c<'0' OR @c >'9')
RETURN 0
SET @i=@i+1
END
RETURN 1
END
go
- Sql Server基本函数
- Sql Server基本函数
- Sql Server 基本函数
- Sql Server基本函数
- SQL SERVER 的函数
- SQL SERVER 的函数
- SQL SERVER 的函数
- Sql Server基本函数
- Sql Server 基本函数
- Sql Server基本函数
- Sql Server基本函数
- sql server 日期函数
- Sql Server基本函数
- Sql Server基本函数
- Sql Server基本函数
- Sql Server基本函数
- Sql Server基本函数
- SQL Server基本函数
- Inside QT Series (九):QMetaObject class data members
- 商务部宣布可口可乐收购汇源案未通过审查
- Certificate: java glossary
- C语言 位域
- 数据库触发器实例讲解
- sql server函数
- X manager 远程连接debain
- 加速 Moblin 發展,確立 Linux 系統於 MID 上之地位
- 用java从网络上抓取HTML文件内容并写入本地文本中
- 做人、做事,做架构师——架构师能力模型解析
- Windows XP启动过程及常见启动故障
- truncate and delete 的另一个区别
- ASCII 字符表
- sql server存储过程和游标的用途