C#技术百科
问问你的心你有没有信心 做事情要专一坚定,执着
declare @Table table(
   KnowledgeID nvarchar(50)
   ,KnowledgeName nvarchar(100)
   ,TypeID int
   ,StatusID int
   ,KeyWords nvarchar(200)
   ,ValidDate datetime
   ,RangeID int
   ,ClickNum int
   ,UseNum int
   ,BookNum int
   ,Score int
   ,CloseCode int
   ,AbolishFlag bit
   ,ModifyFlag bit
   ,SectID nvarchar(50)
   ,SectName nvarchar(50)
   ,ApproveStatus int
   ,ModifierID nvarchar(50)
   ,Modifer nvarchar(50)
   ,CreatorID nvarchar(50)
   ,Creator nvarchar(50)
   ,CreateTime datetime
   ,UpdateTime datetime
            ,SurfacePhenomenon varchar(MAX)
            ,StepContent varchar(MAX)
  )
 --todo .......
 declare @SQL nvarchar(1200) 
 SET @SQL='select KnowledgeID from tbl_KbaKnowledgeCategory where OneLevelSortID='''+@OneLevelSortID+''''
 
 IF LEN(@TwoLevelSortID)>0
 SET @SQL=@SQL+' AND TwoLevelSortID='''+@TwoLevelSortID+''''
 IF LEN(@ThreeLevelSortID)>0
 SET @SQL=@SQL+' AND ThreeLevelSortID='''+@ThreeLevelSortID+''''
 --将分类知识的编号填入临时表
 insert into @Table(KnowledgeID) EXEC(@SQL)
 ---更新知识等级
 update tbl_KbaKnowledge SET RangeID=@Level WHERE KnowledgeID IN (SELECT knowledgeID FROM @Table)
posted on 2011-05-10 10:13  王德田  阅读(530)  评论(0编辑  收藏  举报