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.
22 lines
540 B
Transact-SQL
22 lines
540 B
Transact-SQL
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[F_DanHao]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
|
|
DROP FUNCTION [dbo].[F_DanHao]
|
|
GO
|
|
|
|
SET ANSI_NULLS ON
|
|
GO
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
GO
|
|
|
|
create function [dbo].[F_DanHao](@gid varchar(50),@word varchar(16))
|
|
returns nvarchar(200)
|
|
as
|
|
begin
|
|
declare @S nvarchar(200)
|
|
select @S=isnull(@S,'')+billno+',' from ch_fee_do where feeid=@gid and billno like @word
|
|
return @S
|
|
end
|
|
GO
|
|
|
|
|