Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2008

    Unanswered: Extracting a portion of PK data

    I want to extract a particular portion of primary key field data.For example- suppose there are fifty data in PK field starting from 1...50.Now I want only to extract data from 25 to 50.It is bcos I want to retrieve only the new data that is inserted after a specified time.For example-today there is data starting from 1 to 25 which I have retrieved and saved elsewhere.By tomorrow there will be new data starting from 26 to 50 or more.Now I just want to extract this additional data from the database so that I dont need to extract all data again.Could anybody pls tell me how to do this.How can I do it using common SQL bcos I have to make a program for it.

  2. #2
    Join Date
    Jan 2004
    In a large office with bad lighting
    Add an InsertedDate column to the table with a default of getdate(). Add an index on this column. Use the column to retrieve the data you desire.

    Simple and quick ... what a combination!

    -- This is all just a Figment of my Imagination --

Posting Permissions

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