--- use functionCREATE FUNCTION getItem
(@fid nvarchar(15))
RETURNS nvarchar(500) AS
BEGIN declare @all nvarchar(500)
set @all=''
select @all=@all+ contactInfo
+ '' from Utable where fid=@fid
set @all=left(len(@all)-1)
return @all
END---thenselect [name],dbo.getitem([name]) as contactinfo1 from
(select distinct [name] from Utable) as A
(@fid nvarchar(15))
RETURNS nvarchar(500) AS
BEGIN declare @all nvarchar(500)
set @all=''
select @all=@all+ contactInfo
+ '' from Utable where fid=@fid
set @all=left(len(@all)-1)
return @all
END---thenselect [name],dbo.getitem([name]) as contactinfo1 from
(select distinct [name] from Utable) as A
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货