Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 4 of 4 total |
Find Last Updated Value via SQL |
Wed, Feb 4 2015 6:59 PM | Permanent Link |
Sean B | I am using the ODBC driver and would like to submit a query to get various information about tables. Specifically, the Last Updated date and time and Record count.
Is this possible? |
Wed, Feb 4 2015 8:25 PM | Permanent Link |
Raul Team Elevate | On 2/4/2015 6:59 PM, Sean B wrote:
> I am using the ODBC driver and would like to submit a query to get various information about tables. Specifically, the Last Updated date and time and Record count. > Is this possible? There is nothing built-in that would provide info on the last update (there is a LASTAUTOINC function for some cases but it's not a general solution). One can add last modified timestamp to every table and have it updated by triggers on insert/edit but then it would be up to application code to ensure this is updated. if you wish to track deletes then you'd need an additional table (or some other metod like marking record as deleted but not really deleting it yet). When using dbsrvr you can use server side triggers which would do most of this automatically but again something you'd need to design first. I'm not clear on what record count you are after? If its linked to last modified then again you'd need a custom field. Raul |
Thu, Feb 5 2015 11:40 AM | Permanent Link |
Sean B | Raul,
When I open "Database System Utility" and select a table to open, it shows "Last Updated On" field in the status bar at the bottom of the window. It also shows "Record x of ###,###". I was hoping these values (last updated and total record count) could be returned via a query of a system table or information schema view. I'm using SSIS to read records from the DBISAM tables and put them into a data warehouse. In order to speed up load times, I only want to process those tables that have a "Last Updated On" value greater than the last time the ETL job ran. No worries, I can query the file system objects via SSIS to determine when one of the *.dat files modified date is greater and add logic to process from there. Thanks for the quick reply. |
Thu, Feb 5 2015 12:02 PM | Permanent Link |
Raul Team Elevate | On 2/5/2015 11:40 AM, Sean B wrote:
> When I open "Database System Utility" and select a table to open, it shows "Last Updated On" field in the status bar at the bottom of the window. It also shows "Record x of ###,###". I was hoping these values (last updated and total record count) could be returned via a query of a system table or information schema view. Sean, Last updated field is available when using delphi dbisam table object but not thru SQL or ODBC to best of my knowledge. Here's the manual entry : http://www.elevatesoft.com/manual?action=viewprop&id=dbisam4&product=rsdelphiwin32&version=XE7&comp=TDBISAMTable&prop=LastUpdated If you need to simply know total number of records in the table (i.e. ###,### above) then there are multiple ways - "select count(*) from table" SQL would get you that number or just look at the total record count property of your resultset. Raul |
This web page was last updated on Monday, May 6, 2024 at 12:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |