Results 1 to 3 of 3

Thread: Data comparison query for the DB Report

  1. #1
    Join Date
    Jun 2011
    Posts
    2

    Data comparison query for the DB Report

    For generating a report on Tables last updated,created and the no of bytes increase/decrease as growth.Report will run on demand and has below format.

    Tablename Bytes_Prev Run Bytes_nextrun Growth=column2-column1 creation date updated

    And my table holds values as below:

    Tablename Bytes Creation Date Update_date
    a 20 2011-jun-02 2011-jun-03
    b 30 2011-Jun-11 2011-jun-13
    a 30 2011-jun-02 2011-Jun-20

    Looking to display the data as
    Tbl Bytes_prevrun Bytes_Nextrun growth creationdate updatedate
    a 20 30 30-20=10 2011-Jun-02 2011-Jun-20
    b 30 0 30 2011-Jun-11 2011-Jun-13

    After displaying the data, have to delete a record for 'a' having 20 bytes and update_date as 2011-Jun-03,since in the next run we have latest record in the table for comparing with the input records generated on the next run.
    _

    Need help to produce this output.

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    On which rdbms?

  3. #3
    Join Date
    Jun 2011
    Posts
    2

    it's for sybase..)

    Forgot to metion the RDBMS,how could i miss it..

Posting Permissions

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