If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Table size comparison for generating db report

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-30-11, 20:33
ashoo@sybase ashoo@sybase is offline
Registered User
 
Join Date: Jun 2011
Posts: 1
Table size comparison for generating 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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On