![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General Discussion » View Thread |
Messages 1 to 4 of 4 total |
![]() |
Mon, Jan 7 2013 8:03 AM | Permanent Link |
Abdulaziz Al-Jasser | Hi,
Is it possible to know what the updated/inserted records in a table at a certain date or time a using SQL? Does each record in EDB have a date/time stamp? Regards, Abdulaziz Jasser |
Mon, Jan 7 2013 8:46 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Abdulaziz
>Is it possible to know what the updated/inserted records in a table at a certain date or time a using SQL? Does each record in EDB have a date/time stamp? Its not native to ElevateDB so you'll need to implement your own columns and triggers to get that information. Roy Lambert [Team Elevate] |
Mon, Jan 7 2013 11:10 PM | Permanent Link |
Barry | Abdulaziz Jasser,
Here is trigger-free solution. This simplest way would be to add a couple of columns to the table defined as: "Add_Date" TIMESTAMP DEFAULT Current_TimeStamp NOT NULL "Mod_Date" TIMESTAMP GENERATED ALWAYS AS Current_TimeStamp NOT NULL The Add_Date gets updated only when the row is inserted. The Mod_Date gets updated whenever the row is updated (or inserted). You can then use SQL on these columns like any other TimeStamp column to find rows that were added in the past day, or updated in the past hour etc. (see "Interval" in SQL manual when doing date arithmetic). Barry |
Tue, Jan 8 2013 12:29 PM | Permanent Link |
Abdulaziz Al-Jasser | Barry,
This is what I had in my mine. But I was checking if EDB has this feature built-in. Roy and Barry...big thanks to you. Regards, Abdulaziz Jasser |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |