﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-听涛榭·代码-最新评论</title><link>http://www.cnblogs.com/chentao1006/CommentsRSS.aspx</link><description>基于WEB标准的网站技术文档</description><language>zh-cn</language><pubDate>Thu, 05 Jan 2012 10:01:14 GMT</pubDate><lastBuildDate>Thu, 05 Jan 2012 10:01:14 GMT</lastBuildDate><generator>cnblogs</generator><item><title>Re:URL编码表</title><link>http://www.cnblogs.com/chentao1006/archive/2010/07/28/1787045.html#1881951</link><dc:creator>金0501</dc:creator><author>金0501</author><pubDate>Wed, 28 Jul 2010 07:15:19 GMT</pubDate><guid>http://www.cnblogs.com/chentao1006/archive/2010/07/28/1787045.html#1881951</guid><description><![CDATA[是什么东西啊
<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/chentao1006/" target="_blank">金0501</a> 2010-07-28 15:15 <a href="http://www.cnblogs.com/chentao1006/archive/2010/07/28/1787045.html#1881951#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 简单快速实现分页的SQL查询语句</title><link>http://www.cnblogs.com/chentao1006/archive/2008/06/27/448848.html#1238723</link><dc:creator>雨人</dc:creator><author>雨人</author><pubDate>Fri, 27 Jun 2008 15:46:58 GMT</pubDate><guid>http://www.cnblogs.com/chentao1006/archive/2008/06/27/448848.html#1238723</guid><description><![CDATA[你这条语句都有语法错误，根本谈不到实现分页<br>看看我这个存储过程使用够不够简单<br><br>只要页码，页显示最多条，和SQL语句 <br>例如( exec [les_aaa] 4,15,' select * from sys.sysobjects )<br><br><br><br>/* QQ：312430633 创建日期:2008-6-28 Email:xinxiu_198471@163.com*/<br>CREATE PROCEDURE  [dbo].[les_AllowPaging] <br>@pageindex int,    ----*****页码<br>@PageSize int,     ----*****每页显示条数<br>@tsql varchar(4000)----*****SQL语句<br>as<br><br>Declare @SqlSelect  varchar(4000)<br>Declare @orderby  varchar(4000)<br>Declare @AllowPagingSql  varchar(4000) <br><br>---判断是否排序<br>if CHARINDEX('order by',@tsql) &lt;&gt; 0<br>begin<br>	set @SqlSelect=replace(substring (@tsql,1, CHARINDEX('order by',@tsql)-1),'$','''')  <br>	set @orderby=replace(substring (@tsql, CHARINDEX('order by',@tsql),len(@tsql) ),'$','''')      <br>    set @AllowPagingSql=<br>		'select * from (SELECT  ROW_NUMBER() OVER('+@orderby+') AS AllowPagingId,* FROM ('+<br>		@SqlSelect<br>		+') as table1) as table2 where AllowPagingId between '<br>		+convert(varchar(10),((@pageindex-1) * @PageSize+1))+' and '<br>		+convert(varchar(10), @pageindex * @PageSize) 		<br>	exec  (@AllowPagingSql)<br>end <br>else<br>begin<br>	set @SqlSelect=replace(@tsql,'$','''')  <br>	set @orderby=''<br>    set @AllowPagingSql=<br>		'select *  from (SELECT  ROW_NUMBER() OVER(ORDER BY orderbyID DESC) AS AllowPagingId ,* FROM  ( select *, 1 as orderbyID from ( '<br>		+@SqlSelect<br>		+' )  as  tbs1 )   as Tabl1 ) as table2 where AllowPagingId between '<br>		+convert(varchar(10),((@pageindex-1) * @PageSize+1))+' and '<br>		+convert(varchar(10), @pageindex * @PageSize) 		<br>		exec  (@AllowPagingSql)<br>end<br><br>set @AllowPagingSql='select <br>case <br>     when count(*)%'+convert(varchar(10),@PageSize)+'=0 then count(*)/'+convert(varchar(10),@PageSize)+'<br>     when count(*)%'+convert(varchar(10),@PageSize)+'&lt;&gt;0 then count(*)/'+convert(varchar(10),@PageSize)+'+1<br>end as pageCount,count(*) as RowsCount from ('+@SqlSelect+') as tab1'<br>exec  (@AllowPagingSql)<br><br>--exec [les_aaa] 4,15,' select * from sys.sysobjects where id&gt;$27$ '<br><br><br><br><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/chentao1006/" target="_blank">雨人</a> 2008-06-27 23:46 <a href="http://www.cnblogs.com/chentao1006/archive/2008/06/27/448848.html#1238723#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 实现AJAX的第一步</title><link>http://www.cnblogs.com/chentao1006/archive/2008/04/30/436444.html#1177773</link><dc:creator>陈涛</dc:creator><author>陈涛</author><pubDate>Wed, 30 Apr 2008 07:29:00 GMT</pubDate><guid>http://www.cnblogs.com/chentao1006/archive/2008/04/30/436444.html#1177773</guid><description><![CDATA[@YAKE<br>谢谢，获益匪浅！<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/chentao1006/" target="_blank">陈涛</a> 2008-04-30 15:29 <a href="http://www.cnblogs.com/chentao1006/archive/2008/04/30/436444.html#1177773#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 实现AJAX的第一步</title><link>http://www.cnblogs.com/chentao1006/archive/2008/04/30/436444.html#1177521</link><dc:creator>YAKE</dc:creator><author>YAKE</author><pubDate>Wed, 30 Apr 2008 04:06:00 GMT</pubDate><guid>http://www.cnblogs.com/chentao1006/archive/2008/04/30/436444.html#1177521</guid><description><![CDATA[中文可以用escape<br>比如 request.write escape(&quot;测试&quot;)<br>试一试吧,我的分页里就是用这个.<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/chentao1006/" target="_blank">YAKE</a> 2008-04-30 12:06 <a href="http://www.cnblogs.com/chentao1006/archive/2008/04/30/436444.html#1177521#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 简单快速实现分页的SQL查询语句</title><link>http://www.cnblogs.com/chentao1006/archive/2008/01/24/448848.html#1051600</link><dc:creator>guolude</dc:creator><author>guolude</author><pubDate>Thu, 24 Jan 2008 06:51:00 GMT</pubDate><guid>http://www.cnblogs.com/chentao1006/archive/2008/01/24/448848.html#1051600</guid><description><![CDATA[傻，浪费感情<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/chentao1006/" target="_blank">guolude</a> 2008-01-24 14:51 <a href="http://www.cnblogs.com/chentao1006/archive/2008/01/24/448848.html#1051600#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 简单快速实现分页的SQL查询语句</title><link>http://www.cnblogs.com/chentao1006/archive/2007/12/28/448848.html#1019167</link><dc:creator>陈涛</dc:creator><author>陈涛</author><pubDate>Fri, 28 Dec 2007 15:50:00 GMT</pubDate><guid>http://www.cnblogs.com/chentao1006/archive/2007/12/28/448848.html#1019167</guid><description><![CDATA[如果查询的条件比较复杂，或者查询跨越了多个表，那么很可能会出现问题，此时需要多花一些功夫来处理，比如修改分页SQL语句，或者借用视图等方式来把复杂性转移出去<br><br>请把整个SQL语句发上来，我尽量对症下药帮你看看<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/chentao1006/" target="_blank">陈涛</a> 2007-12-28 23:50 <a href="http://www.cnblogs.com/chentao1006/archive/2007/12/28/448848.html#1019167#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 简单快速实现分页的SQL查询语句</title><link>http://www.cnblogs.com/chentao1006/archive/2007/12/28/448848.html#1018994</link><dc:creator>qwqwq</dc:creator><author>qwqwq</author><pubDate>Fri, 28 Dec 2007 12:29:00 GMT</pubDate><guid>http://www.cnblogs.com/chentao1006/archive/2007/12/28/448848.html#1018994</guid><description><![CDATA[聚合不应出现在 WHERE 子句中，除非该聚合位于 HAVING 子句或选择列表所包含的子查询中，并且要对其进行聚合的列是外部引用。 <br><br>出现上面这几句的错误！！帮助解决一下！！谢谢了！！<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/chentao1006/" target="_blank">qwqwq</a> 2007-12-28 20:29 <a href="http://www.cnblogs.com/chentao1006/archive/2007/12/28/448848.html#1018994#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 简单快速实现分页的SQL查询语句</title><link>http://www.cnblogs.com/chentao1006/archive/2007/12/28/448848.html#1018990</link><dc:creator>qwqwq</dc:creator><author>qwqwq</author><pubDate>Fri, 28 Dec 2007 12:25:00 GMT</pubDate><guid>http://www.cnblogs.com/chentao1006/archive/2007/12/28/448848.html#1018990</guid><description><![CDATA[不行的！到了第二页就没有显示了！现在又遇到了一个问题就是，读两个表的时候也会出错了！帮助解决一下！！<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/chentao1006/" target="_blank">qwqwq</a> 2007-12-28 20:25 <a href="http://www.cnblogs.com/chentao1006/archive/2007/12/28/448848.html#1018990#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 简单快速实现分页的SQL查询语句</title><link>http://www.cnblogs.com/chentao1006/archive/2007/12/28/448848.html#1018689</link><dc:creator>陈涛</dc:creator><author>陈涛</author><pubDate>Fri, 28 Dec 2007 08:30:00 GMT</pubDate><guid>http://www.cnblogs.com/chentao1006/archive/2007/12/28/448848.html#1018689</guid><description><![CDATA[降序只要在其中两处 order by id 后面加上 desc 就可以了<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/chentao1006/" target="_blank">陈涛</a> 2007-12-28 16:30 <a href="http://www.cnblogs.com/chentao1006/archive/2007/12/28/448848.html#1018689#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 简单快速实现分页的SQL查询语句</title><link>http://www.cnblogs.com/chentao1006/archive/2007/12/28/448848.html#1018241</link><dc:creator>qwqwq</dc:creator><author>qwqwq</author><pubDate>Fri, 28 Dec 2007 04:26:00 GMT</pubDate><guid>http://www.cnblogs.com/chentao1006/archive/2007/12/28/448848.html#1018241</guid><description><![CDATA[楼主的SQL语句怎么用降序排列？帮助解决！<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/chentao1006/" target="_blank">qwqwq</a> 2007-12-28 12:26 <a href="http://www.cnblogs.com/chentao1006/archive/2007/12/28/448848.html#1018241#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>
