Print Page | Close Window

Query_RowNumbersAndSumLargeData

Printed From: Roger's Access Library
Category: Other Download Libraries
Forum Name: Tejpal, A.D.
Forum Description: A.D. Tejpal's Library
URL: www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=433
Printed Date: 18 Apr 2024 at 3:03pm
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: Query_RowNumbersAndSumLargeData
Posted By: A.D. Tejpal
Subject: Query_RowNumbersAndSumLargeData
Date Posted: 09 Oct 2008 at 4:44pm

Query_RowNumbersAndSumLargeData
Sample Db - Explanatory Notes

    Subqueries (or user defined functions based upon recordsets) for calculation and display of row numbers and running sum, are found to be slow in case of large data sets.

    Use of increments to global variables offers a faster alternative. This method is preferably used through an action query, as calculated values directly displayed via select query tend to be volatile (the results keep on changing as one navigates up and down the records.

    Two alternative methods based upon incrementing global variables are demonstrated as follows. In each case, two styles are covered, namely (a) Straight simple sequence and (b) Group-wise sequence. If it is simple sequence, the user defined functions have provision for specifying the starting number or sum - if desired:
    1 - Row number and running sum - via update action.
    2 - Row number and running sum - via make table action.

    For academic interest, depiction of row numbers through generation of autonumbers has also been demonstrated as follows (this approach is however not as fast as that involving increments to global variables):
    3 - Row number - via append action..
    4 - Row number - via make table action.

    Note:
    (a) Use of incrementing global variables (items 1 and 2 above), apart from being the fastest approach, has the added benefit that it is not dependent upon availability of primary key.
    (b) Four user defined functions utilized in implementing this method are given in the general module.
    (c) Use of these functions in WHERE clause of pertinent queries is meant to initiate the sequence in desired manner.
    (d) If filter has been applied to displayed data, generation of row number and running sum gets implemented on the filtered data, as demonstrated in the sample db.

    Reference required - DAO 3.6

    Version - Access 2000 file format

Download >>  http://www.rogersaccesslibrary.com/forum/uploads/37/Query_RowNumbersAndSumLargeData.zip - uploads/37/Query_RowNumbersAndSumLargeData.zip
 


-------------
--

Email: mailto:adtejpal@gmail.com - adtejpal@gmail.com



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net