为什么查询出来的数据只有一条 怎么时间排序?
图:
ALTER procedure [dbo].[Meeting_Dynamics]
@startIndex int,
@endIndex int
AS
SELECT * FROM (
SELECT Theme,MeetDate,BeginTime,MeetEndTime,MeetRoomId,Content,ROW_NUMBER() OVER(ORDER BY .MeetingInformation.MeetKey ASC) AS RowNumber FROM MeetingInformation where MeetingInformation.ReviewStatus=4 and MeetingInformation.IsDeleted=0
) AS Temp WHERE Temp.RowNumber BETWEEN @startIndex AND @endIndex ORDER BY CONVERT(DATETIME,MeetDate) desc
ALTER procedure [dbo].[Meeting_Dynamics]
@startIndex int,
@endIndex int
AS
SELECT * FROM (
SELECT Theme,MeetDate,BeginTime,MeetEndTime,MeetRoomId,Content,ROW_NUMBER() OVER(ORDER BY .MeetingInformation.MeetKey asc) AS RowNumber FROM MeetingInformation where ReviewStatus=4 and IsDeleted=0
) AS Temp WHERE Temp.RowNumber BETWEEN @startIndex AND @endIndex ORDER BY CONVERT(DATETIME, MeetDate) DESC
看不懂,帮顶
ROW_NUMBER() OVER(ORDER BY .MeetingInformation.MeetKey ASC) 改成按时间排序,去掉最后的order by