标签:io 2014 ar cti ad ef har on
USE [instrument]
GO
/****** Object: UserDefinedFunction [dbo].[fn_getDspKeywordDetail] Script Date: 08/08/2014 15:53:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[fn_getDspKeywordDetail]
(@SellKeyWordId bigint)
RETURNS varchar(6000)
AS
BEGIN
DECLARE @keywords varchar(6000),@keyId varchar(6000)
SET @keywords=‘‘
select @keywords= @keywords+ isnull( ( Lexicon),‘‘)+‘,‘ from (
select distinct top 12 Lexicon from IM_Dsp_Ad_Sell_KeyWord_Detail left join Search_Lexicon on IM_Dsp_Ad_Sell_KeyWord_Detail.LexiconId=Search_Lexicon.Lexicon_id
where SellKeyWordId=@SellKeyWordId) b
RETURN @keywords
END
标签:io 2014 ar cti ad ef har on
原文地址:http://www.cnblogs.com/huhangfei/p/3899600.html