sql分页
SELECT TOP 10 LS_INFO_new.id,LS_XM,(case when LS_XB='1' then '男' else '女' end) LS_XB,dbo.F_GetMC(LS_WHCD,'1e') LS_WHCD,(case when LS_ZYLB='1' then '专职律师' when LS_ZYLB='2' then '兼职律师' when LS_ZYLB='3' then '公职律师' when LS_ZYLB='4' then '公司律师' when LS_ZYLB='5' then '法律援助律师' else '' end) LS_ZYLB,LS_ZYZH,dbo.F_GetMC(LS_HJQH,'1c') LS_HJQH,LS_ZT FROM LS_INFO_new inner join SWS_INFO on SWS_INFO.ID = LS_INFO_new.LS_SWSID WHERE LS_XM like '小%' and LS_INFO_new.id IN(SELECT TOP 100 id FROM LS_INFO_new ORDER BY LS_CSRQ ASC, id ASC ) ORDER BY LS_CSRQ ASC,LS_INFO_new.id ASC
我现在的sql分页语句是这样的 但是数据显示没有分页 求大神指教
------解决方案--------------------在sql server版已经给你回复了,你需要建一个传送分页参数的类,这个类大概是这样:
public class SimpleDataFilter
{
public int PageSize
{
get;
set;
}
public int PageIndex
{
get;
set;
}
public SortOrder SortType
{
get;
set;
}
public string SortExpression
{
get;
set;
}
/// <summary>
/// 根椐某一条件查询结果后,分页前的总记录数。
/// </summary>
public int RecordCount
{
get;
set;
}
/// <summary>
/// 获取分页记录开始索引号
/// </summary>
public int StartIndex
{
get
{
return this.PageIndex * this.PageSize + 1;
}
}
/// <summary>
/// 获取分页记录结尾索引号
/// </summary>
public int EndIndex
{
get
&