Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2008
    Posts
    2

    Unanswered: Adding Records using Query

    I have created a query to add records into an existing table.
    This table and query are linked by a Primary key

    I have no problems adding the records and it is updating the table, however it is adding the records at the top of the table, see attached screen print.

    I require these records to be added to the bottom of the table, for printing and validation reasons.
    It doesn't matter what serial number or failure code added to the record, they are always saved in this location.

    Please help

    Vaz
    Attached Thumbnails Attached Thumbnails DB Records.jpg  

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    In relational theory there is no such thing as "top" or "bottom" or "first" or "last" of a set. Sets are unordered. The contents of a table are an example of a set.

    The way you order your data is by using a SQL statement and specifying the order in the ORDER BY clause. As such, you will need some sortt of "sequencing" column to order by.

    Basic SQL tutorial:
    http://www.w3schools.com/sql/default.asp

    HTH

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Just a follow up quote
    Quote Originally Posted by Brett Kaiser
    The physical order of data in a database has no meaning
    George
    Home | Blog

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by georgev
    Just a follow up quote
    I think Brett was in turn quoting ....

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    if you want to do that you could consider using an autonumber column, or possibly a date_added column and sort on either

    Of the two I'd suspect a dateAdded column would make more logical sense... that would allow for the same information to be added and maintained concurrently.

    Ie you could cater for the the same fault to be indentified on subsequent visits, which may indictae sya its another component upstream of the element that is actually failing.

    HTH

  6. #6
    Join Date
    Feb 2008
    Posts
    2
    Thanks for your help, i have added in an ID number (autonumber) which i will use to control the sequence of numbers.
    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •