You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/word/新协航_设计文档/数据库建表文档/20131223/YN函数.sql

32 lines
585 B
MySQL

3 years ago
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[F_YN]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
DROP FUNCTION [dbo].[F_YN]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create function [dbo].[F_YN](@CS tinyint)
returns varchar(4)
as
begin
declare @S varchar(4)
if @CS is null
set @S=' <20><>'
else
if @CS=0
set @S=' <20><>'
else
set @S='<EFBFBD><EFBFBD>'
return @S
end
GO
select dbo.f_yn('')