Code ALTERPROCEDURE[sp_test] ( @conditionsvarchar(1000), @totalint output ) AS --select @total=count(*) from t_spiderreports declare@maxDatedatetime; set@maxDate=(selectmax(fld_DateTime) from t_Spiderreports); declare@strCMDvarchar(1000); set@strCMD=' select top 10 * from t_spiderreports t where year(fld_DateTime)=year('''+convert(varchar(10),@maxDate,101)+''') and datename(week,fld_DateTime)=datename(week,'''+convert(varchar(10),@maxDate,101)+''')'
--print @StrCMD exec (@strCMD)
posted on
2009-10-21 17:07Robin99
阅读(185)
评论(0)
编辑收藏举报