sql="select * from (select top 4 ID,SmallPic,NewsNameSi,EndDate,ContentSi,SortID from achi_news where ProductProperty=1 and IsOk=1 and HomeForcePage=1 and HomeEndTime>getDate() and isdate(HomeEndTime)=1 order by HomeorderNum asc )a union all select * from (select top 4 ID,SmallPic,NewsNameSi,EndDate,ContentSi,SortID from achi_news where ProductProperty=1 and IsOk=1 and Id not in (select top 4 ID from achi_news where ProductProperty=1 and IsOk=1 and HomeForcePage=1 and HomeEndTime>getDate() and isdate(HomeEndTime)=1 order by HomeorderNum asc) order by Enddate asc)b"
'set rs=getRsBySql(sql)
set rs=getStoredProcBySql(sql)
对ID,SmallPic,NewsNameSi,EndDate,ContentSi,SortID 这个几个字段必须按查询时的顺序读取,否则未按顺序读取的字段不能正确显示!