dddd

CREATE  PROCEDURE dbo.s_mediaabouts_get
@mediaid int
@maincatalogid int

as
create table @aboutlist(id int identity(1,1) not null,nid int)


declare @tags nvarchar(256)
declare @int int
declare @curCount int

eddd
 select @tags = (select tags from vodmax_medias where mediaid = @mediaid)
 set @int = charindex('|',@tags)
 if @int = 0 --只有一个tag
  begin
   insert into @aboutlist(nid)seletc top 4 mediaid from vodmax_medias

where tags like '%'+@tags+'%'
   set @curCount = @@rowcount \
   
   if @curcount < 4
   select top
  end
 else
  begin
  end

posted @ 2007-08-03 14:38  苔苔以苔苔以苔  阅读(252)  评论(0编辑  收藏  举报
猪先飞