Viewing 15 posts - 12,091 through 12,105 (of 18,923 total)
For performance reasons it is better to use a statement like this one :
CREATE PROC dbo.DemoDateRange @iDaysOld as int
AS
SET NOCOUNT ON
Declare @DateStart as datetime
--Today's date without the time
SET @DateStart...
May 18, 2006 at 7:15 am
You don't. It runs only when data is modified (depending on how you set it up). Once its job is over, then it stops itself untill next execution.
May 16, 2006 at 1:02 pm
It mwans that those objects are linked to that tables. The first two are check constraints and the last one is a view of course.
You must also be aware that...
May 16, 2006 at 7:06 am
After the fact : no. Unless you buy a log reader which can be quite expansive. A good backup can also do the job.
May 15, 2006 at 1:37 pm
Care to expand on this idea???
"...I don't have to use a datetime in the PK of the log table (which is a bad practice)"
May 15, 2006 at 7:26 am
It's under concatenation :
IF Object_id('ListTableColumns') > 0
DROP FUNCTION ListTableColumns
GO
CREATE FUNCTION dbo.ListTableColumns (@TableID as int)
RETURNS varchar(8000)
AS
BEGIN
Declare @Items as varchar(8000)
SET @Items = ''
SELECT
@Items = @Items + C.Name + ', '
FROMdbo.SysColumns C
WHEREC.id...
May 14, 2006 at 10:04 pm
Com'on guys... that's not something you're supposed to make the server do... unless the whole task is made on the server which is rarely the case.
May 12, 2006 at 7:16 am
Sorry, emergency time here... no more time on ssc this week...
May 11, 2006 at 11:55 am
... and if you're trying to rebuild the whole history of the row then I have no elegant solution to offer. You might be able to pivot the changes on...
May 11, 2006 at 11:46 am
ok here's a modified version :
Select ColName, Value from dbo.LogTable LT inner join
(Select Max(UpdatedTS), ColName FROM dbo.LogTable where Pk = @pk group by ColName) dtLastVersion
on LT.UpdatedTS = dtLastVersion.UpdatedTS and LT.PK...
May 11, 2006 at 11:42 am
Something like :
Select ColName, NewValue from dbo.LogTable LT inner join
(Select Max(PK), ColName FROM dbo.LogTable group by ColName) dtLastVersion
on LT.pk = dtLastVersion.PK
Once you have that, have the application or calling proc...
May 11, 2006 at 11:09 am
That's a very good question.. One that I never got around to ask so I have no idea what to answer... I'll let the real gurus take this one
May 11, 2006 at 7:37 am
Viewing 15 posts - 12,091 through 12,105 (of 18,923 total)