政务公开公开信息查询列表sinsql_sysqueryFalseIndexNumbersupersql索引号Titlesupersql名称Contentsupersql正文StartDatesupersql起始日期EndDatesupersql结束日期Keywordsupersql关键词Truetruetrue
SELECT Top @pagesize * FROM PE_GV_PublicInformation WHERE Status = 2 AND IsExpired = 0
AND IndexNumber = '@IndexNumber'
AND Title Like '%@Title%'
AND Content Like '%@Content%'
AND PublicTime >= '@StartDate'
AND PublicTime <= '@EndDate'
AND Keyword Like '%@Keyword%'
AND ID not in
(SELECT Top @startrow ID FROM PE_GV_PublicInformation WHERE Status = 2 AND IsExpired = 0
AND IndexNumber = '@IndexNumber'
AND Title Like '%@Title%'
AND Content Like '%@Content%'
AND PublicTime >= '@StartDate'
AND PublicTime <= '@EndDate'
AND Keyword Like '%@Keyword%'
ORDER BY PublicTime DESC
) ORDER BY PublicTime DESC
SELECT Count(ID) FROM PE_GV_PublicInformation WHERE Status = 2 AND IsExpired = 0
AND IndexNumber = '@IndexNumber'
AND Title Like '%@Title%'
AND Content Like '%@Content%'
AND PublicTime >= '@StartDate'
AND PublicTime <= '@EndDate'
AND Keyword Like '%@Keyword%'
]]>标记之间写分页SQL查询语句
select count(id) from PE_GV_PublicInformation ]]>请先建立SQL分页语句