50%记录的函数
ALTER FUNCTION [dbo].[fu_GetCaption](@Stage nvarchar(50) ,@T_stage_weeks int ,@S_stage_months int ,@RowNum int --第几行 ) RETURNS nvarchar(260) AS BEGIN Declare @caption nvarchar(260)='' SELECT @caption=caption FROM(SELECT T_stage_weeks ,S_stage_months ,caption ,ROW_NUMBER()OVER(ORDER BY Id)rn FROM XXX WHERE Stage = @Stage AND T_stage_weeks = @T_stage_weeks AND S_stage_months = @S_stage_months)t WHERE t.rn % 2 = @RowNum % 2 return @caption END
生活没有输赢,不要在乎别人如何评价你,开心就好。
QQ群:158138959