Results 1 to 3 of 3

Thread: Append Query

  1. #1
    Join Date
    May 2002
    Posts
    19

    Unanswered: Append Query

    I am using the append query to populate data into an empty table. I only need the top 20 records based on my sales field. How can I limit my table to only 20 records. Will I do this through the query, table design, or through code? Thanks

  2. #2
    Join Date
    Apr 2002
    Location
    Germany
    Posts
    228
    Your question already contains the keyword, "top"

    INSERT INTO MyTable (MyInsertFieldList)
    SELECT TOP 20 MySelectFieldList
    FROM MyOtherTable
    ORDER BY sales DESC;

    ...inserts from the records with the 20 highest sales values.

  3. #3
    Join Date
    May 2002
    Posts
    19

    Append Query

    Like a charm....Thanks, Dude

Posting Permissions

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