How to find out the date/time of when a record was last update?

Hi,
Is there a way to determine the date or/time of when a record was last 
update, w/out using audit ?

thanks in advance,

Karena
0
Karena
8/31/2001 12:15:59 AM
sybase.ase.general 8655 articles. 0 followers. Follow

6 Replies
526 Views

Similar Articles

[PageSpeed] 10

Add a timestamp or datetime column to you table to track this. 

steve
[TeamSybase]
0
Steve_Katz_
8/31/2001 1:45:57 PM
but is there any way to track it down if i didn't have the timestamp column 
set up? 

thanks, 

Karena
0
Karena
8/31/2001 5:55:48 PM
Not easily, and probably not at all.  For instance, if you have a series of
database dumps, you could start loading them and checking the contents of the
row until you find the db dumps where it has value (a) in the first dump and
(b) in the next dump - you would then know the change happened between those
two times.

Karena wrote:

> but is there any way to track it down if i didn't have the timestamp column
> set up?
>
> thanks,
>
> Karena

0
Bret
8/31/2001 10:46:53 PM
>>>>> "Steve" == Steve Katz <Steve_Katz_> writes:

    Steve> Add a timestamp or datetime column to you table to track this.

Just to followup on this, a column of _type_ timestamp *won't* allow you to
track dates or times of the rows being inserted.  It is a poor choice of
name for a data type and leads to much confusion, but that is history.
Obviously, if you called your column timestamp and it happened to be of
type datetime, then that would be OK, if a little confusing.

Just wanted to ensure that there was no confusion arising from your answer.

dowen
-- 
David Owen     Midsomer Consultants Inc.      dowen@midsomer.org
Maintainer of the Sybase FAQ: http://www.isug.com/Sybase_FAQ
0
David
9/10/2001 2:15:43 AM
David Owen wrote:

> Just to followup on this, a column of _type_ timestamp *won't* allow you to
> track dates or times of the rows being inserted.  It is a poor choice of
> name for a data type and leads to much confusion, but that is history.
> Obviously, if you called your column timestamp and it happened to be of
> type datetime, then that would be OK, if a little confusing.
> 
> Just wanted to ensure that there was no confusion arising from your answer.

	Further to which, I don't think you can call a field 'timestamp'
	and give it a different datatype. Its been some time since I've
	done this, but I seem to recall that you can either use the
	keyword 'timestamp' on its own, as in -

	create table foo
	(
		keycol	int,
		timestamp
	)

	or give the field a name and user the user defined datatype timestamp
	as the datatpye. You can also declare the field as 'timestamp timestamp'.

	Regardless, it should be documented in the Commands Reference Manual
	and/or the Transact-SQL Users Guide.

-am	� 2001
0
Anthony
9/10/2001 11:51:45 AM
>>>>> "Anthony" == Anthony Mandic <amandic@*t.com.au> writes:

    Anthony> David Owen wrote:
    >> Just to followup on this, a column of _type_ timestamp *won't* allow
    >> you to track dates or times of the rows being inserted.  It is a
    >> poor choice of name for a data type and leads to much confusion, but
    >> that is history.  Obviously, if you called your column timestamp and
    >> it happened to be of type datetime, then that would be OK, if a
    >> little confusing.
    >> 
    >> Just wanted to ensure that there was no confusion arising from your
    >> answer.

    Anthony> 	Further to which, I don't think you can call a field
    Anthony> 'timestamp' and give it a different datatype. Its been some
    Anthony> time since I've done this, but I seem to recall that you can
    Anthony> either use the keyword 'timestamp' on its own, as in -

    Anthony> 	create table foo ( keycol int, timestamp )

Thought I better give this a try, and if you create a table as in foo, it
certainly defaults to type 'timestamp'.  However, it is possible to create
a table with a column named timestamp whose type is datetime.  It will even
allow me to insert into it as normal.

1> create table dowen (keycol int, timestamp datetime)
2> go
1> insert dowen values (1, getdate())
2> go
(1 row affected)
> select * from dowen
> go
 keycol      timestamp          
 ----------- -------------------
           1 Sep 12 2001  8:43PM

(1 row affected)

I still think that such a thing would be *very* confusing.

dowen
-- 
David Owen     Midsomer Consultants Inc.      dowen@midsomer.org
Maintainer of the Sybase FAQ: http://www.isug.com/Sybase_FAQ
0
David
9/13/2001 2:48:35 AM
Reply:

Similar Artilces:

How to find out the date/time of when a record was last update? #2
...

How to find out the date of when a record was updated?
Hi, Is there a way to determine the date or/and time of when a record was last updated , w/o using the audit feature? thanks, Karena kho@mail.arc.nasa.gov wrote... > Hi, > Is there a way to determine the date or/and time of when a record was last > updated , w/o using the audit feature? I've seen the timestamp column used to approximate the time a row was changed. The usual way is to add a DATETIME column to the table and have the INSERT and UPDATE triggers set the value. -- Jim Egan [TeamSybase] Senior Consultant Sybase Professional Services Every ...

Updating Record Date and Times From Current Values
I am having trouble writting a query that I thought I had a grasp on.The scenario is this - when a user logs in using a test account, all of the records associated with that account will be updated to show the current month and year, but I want them to retain the day and time that is already in the date field.Example: say a record's date value is currently '2008-11-13 10:37:30.000' , when the test account is launched I want it to update to '2009-[currentMonth]-[currentDay] 10:37:30.000'This is as far as I have gotten in the update statement: UPDATE records SET rec_d...

How do you know the last date/time update stats is run on a table?
regards, Abel The nitty-gritty is in sysstatistics. An SP that generates the output below is my sp_newstats proc in the dba.sql file at http://www.bossconsulting.com/sybase_dba/ However you better read the Installation Guide first since other procs also have to be loaded. A quicker way would be to use the code and strip off the execution of sp_date, etc. that prettyprints the dates. sp_newstats CURRENT DATE/TIME -------------------------------- May 6, 2001 (08:40:53 AM) THERE ARE 48 STATISTICS ROWS FOR 9 SYSTEM TABLES IN systatistics. THERE ARE 4...

Update Only the Time in a date time field
Hi,i have a table having a datatime field and on a datagrid I need only to display and update the time part. I'm using select CONVERT(CHAR(8), JobStartTime, 8) AS StartTime from table to get the date. What is  the best way to write the update command . What woul dbe the best approch.   Regards, Vijay  1. Instate of doing formatting in the SQL, Try to do that is the DataGrid with FormatString. 2. To Update the Database , you can do that in two ways.    a. Either go for Store Procudure. Send the TIME you want to set for record. Your SP should some ...

Updated Date/Time all Time Zones
Hi,I am working on a Web ASP.NET APPLICATION, which has different sub domains for all the different Countries, I need to show the Current Date/Time based on DayLight Saving as well but I am unable to find a perfect solution for this, I am not looking for a Paid WebService as the Site might not show the Date/Time if the Vendor stops that WebService,it is one crucial requirement and I am sure there should be a way in asp.net 2.0 to figure this out.......thanks    A fundamental rule in technology says whatever can be done will be done See this: http://www.timeanddate.com/time/dst200...

date/time or date and time
I am setting up an SQL database and I will need to get differences in dates. For example I have a start date, start time, completion date and completion time and I want to get the difference between the start and completion. Would it be better to have one field with both date and time in it, or better to have a date field and a time field? Even though I have already started setting up the tables with seperate fields for date and time I am now leaning toward one field with date/time in it. (Only because that is the way I had to do it when setting up an Excel spreadsheet for a similar ta...

Membership.GetUser() does not update the last-activity date/time stamp for the user
I am writing the "Who is online" function for my application and found that Membership.GetUser() does not update the last-activity date/time stamp for the user as expected. This make my application considers a user offline after he/she logs into the system after the number of minutes specified in the "userIsOnlineTimeWindow" property (even he/she is still working in the application). I have searched on web all day and found no clues on this problem.Has anyone encountered the same kind of problem? Any help would be greatly appreciated.Thanks a lot.  Membership.GetUs...

updating Oracle date column without update time
Hello, I have an oracle table with a Date column. When I do a DW update(), the generated update is as follow : update table set date_maj = to_date('15-09-2000 15:09:14','DD-MM-YYYY HH24:MI:SS') But I don't want the TIME to be updated, I'd like a format like : to_date('15-09-2000 00:00:00','DD-MM-YYYY HH24:MI:SS') where the time is set to midnight, wich is the Oracle default for date columns when you don't want to treat with time. I'm using 7.02 build 8046, and I think the behaviour in previous versions was not the same. ...

Add date to record in SQL server each time record is added
Hi   Can anyone advise me as to how I can add the date and time to 2 columns in the sql server database for each record that is added. I'd prefer not to use the webform. Can sql server add the date automatically to the row? thanks Sure, you can do it a number of ways.  Add a datetime field to your table, and set it's default value to either GetDate() or GetUTCDate().  That's one approach, but it only works for inserts. If you want to have it updated on every update, then you will need to implement that in a trigger, or modify your UPDATE statements to set the field to Ge...

While using a repeater, how can I trim the time off of the Date/Time field in my record?
I want to display only the date from the date/time value in my record. I tried doing this by using RTRIM in the body of my code, but that just displayed the word "RTRIM".  I know I wasn't thinking there. I can't figure out how to do it in the script of a repeater though. Does anyone have any suggestions?  I am using VB script and really can't follow C or java. The DateTime datatype has a Date properrty which just returns the date part. So yourvariable.Date is all you need. Try: <%# String.Format("{0:d}", Eval("Your_Date_Field"))...

superreview canceled: [Bug 88454] fast-update.pl: add automatic "last update time" & update whole tree : [Attachment 117305] diffs against brad-fast tinderbox to add few fixes from bbaetz
Serge Gautherie <sgautherie.bz@free.fr> has canceled superreview: Bug 88454: fast-update.pl: add automatic "last update time" & update whole tree https://bugzilla.mozilla.org/show_bug.cgi?id=88454 Attachment 117305: diffs against brad-fast tinderbox to add few fixes from bbaetz https://bugzilla.mozilla.org/attachment.cgi?id=117305&action=edit ...

Last Date Updated
I am looking for a module which should show the last date the site was updated. I tried to find old topics related with this issue but the results were unrelated.. I am using DNN212. Can anyone help? I guess this module is in the WANTED list by a lot of ppl... Thank you for your help! [/antonisc] nobody? i thought it was an interesting topic but.. It is an interesting topic, but the challenge lies in figuring out what updated means in the context of any number of modules. It would require a standard way for all modules to notify the core when their content has been modifi...

Seperate Date and Time Merge; done at SQL Update or C# .NET then Update
I do realize that his could be posted in a few spots but I think the answer is in the SQL. I have a ASP.NET page, with a SqlDataSource, Text Box and Calendar Controls. I have the textbox and calendar controls eval'ed to the same sql data source DateTime Field. The text box is formatted eval to small time and the calendars eval has no formatting. ex: <asp:TextBox ID="START_TIME" Text='<%# Eval("EVENT_START","{0:t}") %>' runat=server Width=200></asp:TextBox> I want to merge the two controls; one has the date the other has the time when I update the pages data to the SqlDa...

Web resources about - How to find out the date/time of when a record was last update? - sybase.ase.general

Windows Update - Wikipedia, the free encyclopedia
Windows Update is a service provided by Microsoft that provides updates for the Microsoft Windows operating system and its installed components, ...

Gizmodo.com Updates
Nobody should have to use a pay phone , natural disaster or no natural disaster. So if your gadgets are out of juice after Sandy, here’s a tiny ...

Lifehacker.com Updates
By Whitson Gordon Ever run into a situation where you have multiple wireless networks available, but one is clearly better than the other? WiFi ...

Facebook To Update Mobile Apps Every 4 To 8 Weeks
On the same day that Facebook released a bunch of mobile updates for Apple and Android devices , the social network also announced that it will ...

China Mobile (Hong Kong) Ltd. Analyst Ratings Update
China Mobile (Hong Kong) Ltd. Analyst Ratings Update American Trade Journal Research firm Zacks has rated China Mobile (Hong Kong) Ltd. (NYSE:CHL) ...

Windows 10 Mobile Update For Older Lumias Pushed To 2016
... the roll out of Windows 10 Mobile to existing Lumia devices in December. With December being half over by this point, the fact that the update ...

Microsoft updates OneDrive with Spotlight search and offline file support
Microsoft has recently pushed a couple of updates to the official iOS app of its cloud storage service , OneDrive , thereby introducing a couple ...

Market update, December 18 - Business Insider Deutschland
Stock futures are lower and crude oil is near the lowest levels since early 2009.

Polling update: The Trump surge continues, nothing new on the Democratic side
REPUBLICANS Once again, the interesting action this week has all been on the GOP side. I mean, Donald Trump had hovered around the 30 percent ...

Fire Alarm Clears L.A. Theater Showing ‘Force Awakens’; LAFD Reports False Alarm – Update
UPDATED, 8:50 PM: According to social media reports, moviegoers who were evacuated from Pacific Theatres at the Grove were allowed back in, and ...

Resources last updated: 12/19/2015 8:42:00 PM