<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: LIMIT function mysql/access/mssql</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/limit-function-mysqlaccessmssql</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/limit-function-mysqlaccessmssql/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on LIMIT function mysql/access/mssql</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/limit-function-mysqlaccessmssql#p11141</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/limit-function-mysqlaccessmssql#p11141</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Sorry - you are right. I do not have work long time with MSSQL, so this was first that I have in mind.</p>
<p>Googling it I found this:&#160; <a href="http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=850&#038;lngWId=5" rel="nofollow" target="_blank"><a href="http://www.planet-source-code" rel="nofollow">http://www.planet-source-code</a>......8;lngWId=5</a></p>
<p><input type='button' class='sfcodeselect' name='sfselectit6451' value='Select Code' data-codeid='sfcode6451' /></p>
<div class='sfcode' id='sfcode6451'>
<p><span style="font-size: small;"><span style="font-size: xx-small;"><span style="font-size: small;"><span style="font-size: x-small;"><span style="color: black; font-size: xx-small;">SELECT TOP [x] [fields] <br />FROM [table] <br />WHERE ([clause]) <br />AND [pKey] NOT IN (</span></span></span></span></span></p>
<p>SELECT [pKey] FROM (</p>
<p>SELECT TOP [y] [fields2] <br />FROM [table] <br />WHERE [clause] <br />ORDER BY [sort]) as [Tbl1]) </p>
<p>ORDER BY [sort]</p>
<p>[x] = num rows<br />[y] = 0 based offset<br />[fields] = fields you want<br />[table] = table / joins / whatever<br />[clause] = where clause<br />[pKey] = primary key of table / virtual view in [table]<br />[fields2] = Only requires [pKey] and [sort] columns<br />[sort] = normal sort.  Identical for both incl. ASC / DESC<br />[Tbl1] = name doesn&#39;t matter, it&#39;s for parser, not for you.</p>
</div>
<p>Hope this will help.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 27 Oct 2009 07:17:33 +0200</pubDate>
        </item>
        <item>
        	<title>Mark C on LIMIT function mysql/access/mssql</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/limit-function-mysqlaccessmssql#p11137</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/limit-function-mysqlaccessmssql#p11137</guid>
        	        	<description><![CDATA[<p>Hi Tony, thanks for reply.</p>
<p>I have seen both code examples before and neither work properly (access), mssql link has it&#39;s limits.</p>
<p><span id="intelliTxt">select * from mytable limit 10, 20</span></p>
<p>Start from record 11 and give us the next 20 records (11-30)</p>
<p>In Access and MSSQL your example will not start from a given record point, for example if we have 12000 records like the bigset examples, then doing:</p>
<p>select top 20 *<br />from<br />(select top 30 *<br />from tblInvoice<br />order by invid)<br />order by invid asc</p>
<p>will always give us records 1-20&#160; as the TOP 30 is just reducing the 12000 records to the top 30 right?</p>
<p>Or our we missing something obvious? sortorder? different sortfield? remembering we want to use 12000 records and paginate them like the examples.</p>
<p>Will always give you records 1-20 when really your after records</p>
<p>At the moment our database will probably star with 1000 records but future grow to 10000 so we might see how long it takes to just do a once load all records, as we really need scrolling loading no paging with the auto increment search facility like in the examples.</p>
<p>We&#39;ll have a play with the demo&#39;s.</p>
<p>Regards</p>
<p>Mark C.</p>
]]></description>
        	        	<pubDate>Tue, 27 Oct 2009 06:11:45 +0200</pubDate>
        </item>
        <item>
        	<title>tony on LIMIT function mysql/access/mssql</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/limit-function-mysqlaccessmssql#p11130</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/limit-function-mysqlaccessmssql#p11130</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I will just give you the point &#8211; you will do the rest:</p>
<p>So let suppose that we want to emulate the following mysql sql</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4517' value='Select Code' data-codeid='sfcode4517' /></p>
<div class='sfcode' id='sfcode4517'>
<p><span id="intelliTxt">select * from mytable limit 10, 20</span></p>
</p>
</div>
<p>In MSSQL this can be done like this:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8438' value='Select Code' data-codeid='sfcode8438' /></p>
<div class='sfcode' id='sfcode8438'>
<p><span id="intelliTxt">select top 20 *<br /> from<br /> (select top 30 *<br /> from mytable<br /> order by sortname)<br /> order by sortname sortorder</span></p>
</p>
</div>
<p>If you use MSSQL 2005 you can read more here</p>
<p><span id="intelliTxt"><a href="http://www.select-sql.com/mssql/how-to-make-limit-from-to-in-mssql-2005.html" rel="nofollow" target="_blank"><a href="http://www.select-sql.com/mssq" rel="nofollow">http://www.select-sql.com/mssq</a>.....-2005.html</a></span></p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 27 Oct 2009 04:47:14 +0200</pubDate>
        </item>
        <item>
        	<title>Mark C on LIMIT function mysql/access/mssql</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/limit-function-mysqlaccessmssql#p11094</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/limit-function-mysqlaccessmssql#p11094</guid>
        	        	<description><![CDATA[<p>All the demo&#39;s use MySQL and that Bloody nice LIMIT function for doing the paging of data. We are trying to implement the large data (12000 records) example in ASP using ACCESS &#38; MSSQL (we got it all working with mySQL but project has to be MSSQL/ACCESS only)</p>
<p>They do not have the equivalent LIMIT functionality, (No! TOP WILL NOT WORK after reading 1000 forum posts). As Jqgrid is independant of what ever server-side DB/Language, why is it so reliant on the limit function of mysql how do we do a large database without/with pagination but are able to do the auto search function like in bigset.html.</p>
<p>Regards</p>
</p>
<p>MArk</p>
]]></description>
        	        	<pubDate>Mon, 26 Oct 2009 18:28:57 +0200</pubDate>
        </item>
</channel>
</rss>