|  | Posted by Steve on 01/31/08 05:47 
"Paul Lautman" <paul.lautman@btinternet.com> wrote in message news:60ccruF1pqpbuU1@mid.individual.net...
 > Ivan Marsh wrote:
 >> On Wed, 30 Jan 2008 14:10:02 -0600, Steve wrote:
 >>>
 >>> SELECT    *
 >>> FROM
 >>> (
 >>>   SELECT  (
 >>>             SELECT      COUNT(*)
 >>>             FROM        companies   AS r
 >>>             WHERE       r.Company   <  co.Company
 >>>           )             AS RowNum     ,
 >>>           co.Company    AS Company    ,
 >>>           co.Name       AS Name       ,
 >>>           co.Region     AS Region
 >>>   FROM    companies     AS co
 >>> )
 >>> WHERE     RowNum        BETWEEN 50 AND 100 ORDER BY  RowNum
 >>
 >> ...and have you verified that any of this works with PHP/ODBC hitting
 >> a MDB file?
 > He may not have bothered since he doesn't actually want to do it himself.
 > However, since it is indeed Microsoft's advice of how to do it, they may
 > well have.
 
 usually when someone gets persistent with wanting more than theory or copy,
 i work out the details and actually test it before i post it here. the only
 time i don't test is when i specifically say "this should work, but i
 haven't tested it".
 
 as for microsoft's suggestion, i'm sure they would give such advice. though
 the above is fully functional, it causes much overhead and doesn't scale
 well. the better suggestion, though i didn't demo it here, is to create a
 temp table with an additional, autonumbered field. that field would equate
 to ROWNUM after inserting your SELECTed data...inclusive of condition
 clauses and ordering. but, ms isn't always the best discriminator of
 efficiency and effectiveness.
 
 cheers.
  Navigation: [Reply to this message] |