Results 1 to 8 of 8

Thread: Access query help

  1. #1
    Senior Member greektony's Avatar
    Join Date
    Apr 2006
    Location
    Portsmouth/London, UK
    Posts
    710
    Thanks
    5
    Thanked
    0 times in 0 posts

    Access query help

    I hope someone here can point me in the right direction.

    How do i get an Access query to report on any records AFTER the first 10. I have a table with 10s of records in it. I basically need a report which shows the top 10 records and then have a line with other which is all remaining records summed together.

    Any help would be much appreciated as this is doing my head in, and google is being much help

    Cheers
    Well, I can cut it in half!

    www.theeraserheads.com

  2. #2
    HEXUS webmaster Steve's Avatar
    Join Date
    Nov 2003
    Posts
    14,283
    Thanks
    293
    Thanked
    841 times in 476 posts
    LIMIT 20,30 would show the next 30 records after record 20, methinks... as an example.
    PHP Code:
    $s = new signature();
    $s->sarcasm()->intellect()->font('Courier New')->display(); 

  3. #3
    cat /dev/null streetster's Avatar
    Join Date
    Jul 2003
    Location
    London
    Posts
    4,138
    Thanks
    119
    Thanked
    100 times in 82 posts
    • streetster's system
      • Motherboard:
      • Asus P7P55D-E
      • CPU:
      • Intel i5 750 2.67 @ 4.0Ghz
      • Memory:
      • 4GB Corsair XMS DDR3
      • Storage:
      • 2x1TB Drives [RAID0]
      • Graphics card(s):
      • 2xSapphire HD 4870 512MB CrossFireX
      • PSU:
      • Corsair HX520W
      • Case:
      • Coolermaster Black Widow
      • Operating System:
      • Windows 7 x64
      • Monitor(s):
      • DELL U2311
      • Internet:
      • Virgin 50Mb
    is there a way of doing the whole

    "select top 10 table.field from table"

    thing for the top 10, and then 'subtract' that from

    select * table.field from table, in order to get the rest?

  4. #4
    Senior Member greektony's Avatar
    Join Date
    Apr 2006
    Location
    Portsmouth/London, UK
    Posts
    710
    Thanks
    5
    Thanked
    0 times in 0 posts
    thanks for the suggestions guys.....I managed to get the results I wanted from an unmatched query Thanks anyways though
    Well, I can cut it in half!

    www.theeraserheads.com

  5. #5
    Administrator Moby-Dick's Avatar
    Join Date
    Jul 2003
    Location
    There's no place like ::1 (IPv6 version)
    Posts
    10,665
    Thanks
    53
    Thanked
    384 times in 313 posts
    SELECT fields FROM table where fields NOT IN (SELECT TOP 10 fields FROM table)

    would do it ( if I got the formatting correct )
    my Virtualisation Blog http://jfvi.co.uk Virtualisation Podcast http://vsoup.net

  6. #6
    cat /dev/null streetster's Avatar
    Join Date
    Jul 2003
    Location
    London
    Posts
    4,138
    Thanks
    119
    Thanked
    100 times in 82 posts
    • streetster's system
      • Motherboard:
      • Asus P7P55D-E
      • CPU:
      • Intel i5 750 2.67 @ 4.0Ghz
      • Memory:
      • 4GB Corsair XMS DDR3
      • Storage:
      • 2x1TB Drives [RAID0]
      • Graphics card(s):
      • 2xSapphire HD 4870 512MB CrossFireX
      • PSU:
      • Corsair HX520W
      • Case:
      • Coolermaster Black Widow
      • Operating System:
      • Windows 7 x64
      • Monitor(s):
      • DELL U2311
      • Internet:
      • Virgin 50Mb
    Quote Originally Posted by Moby-Dick View Post
    SELECT fields FROM table where fields NOT IN (SELECT TOP 10 fields FROM table)

    would do it ( if I got the formatting correct )
    thats what i was talking about, just using the right syntax and slightly more brain power

  7. #7
    Senior Member greektony's Avatar
    Join Date
    Apr 2006
    Location
    Portsmouth/London, UK
    Posts
    710
    Thanks
    5
    Thanked
    0 times in 0 posts
    new problem now access gurus....... is it possible for an Access 2000 REPORT to display data from more than one query.

    I am looking to display the top 10 records as 10 individual lines then with a line for other items which would be the total of the records not in the top 10. Followed at the bottom of the page with a total line which would add all the lines above it together.

    All and any help is much appreciated
    Well, I can cut it in half!

    www.theeraserheads.com

  8. #8
    Administrator Moby-Dick's Avatar
    Join Date
    Jul 2003
    Location
    There's no place like ::1 (IPv6 version)
    Posts
    10,665
    Thanks
    53
    Thanked
    384 times in 313 posts
    Not sure about access report design so I can't remeber where you put the underlying SQL into it
    my Virtualisation Blog http://jfvi.co.uk Virtualisation Podcast http://vsoup.net

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. ASP querystring database query
    By pritsey in forum Software
    Replies: 2
    Last Post: 30-12-2006, 01:31 AM
  2. RMA Query
    By billythewiz in forum SCAN.care@HEXUS
    Replies: 7
    Last Post: 07-11-2006, 05:44 PM
  3. Microsoft Access Security Query
    By martina in forum Help! Quick Relief From Tech Headaches
    Replies: 0
    Last Post: 26-07-2006, 04:28 PM
  4. Microsoft Access Security Query
    By martina in forum Help! Quick Relief From Tech Headaches
    Replies: 1
    Last Post: 26-07-2006, 03:51 PM
  5. Belkin F5D6130 802.11b Wireless Access Point
    By Howard in forum Reader Reviews
    Replies: 4
    Last Post: 10-12-2004, 11:20 PM

Posting Permissions

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