Viewing 15 posts - 406 through 420 (of 600 total)
You lost me Jeff....
I need that code to do my deletes...dont' I?
May 3, 2010 at 6:39 am
hmm...no i haven't
really didn't think I needed to create any joins because I'm checking for max/min date on createddate
my assumption was that I would not see any dates < my...
April 30, 2010 at 3:14 pm
fwiw- I've looked at the remaining records and they look correct..
no nulls, etc
shoudln't it delete every record less then that date?
April 30, 2010 at 2:35 pm
Thanks guys for answering.
I could be wrong, but I don't think it's the time.
It is deleting many records. But when I do a min/max on createddate it is always the...
April 30, 2010 at 2:18 pm
Grant,
I've now been told that I need to not delete any records from table C.
I'm trying to run this:
declare @DaysToRetainSMALLINT
DECLARE @cutoffdate DATE
SET @daystoretain = '200'
SET @cutoffdate = '12/01/2009'
SELECT@CUTOFFDATE = DATEADD(dd,...
April 29, 2010 at 9:04 am
Atif Sheikh
that sounds like the easiest way for me to go...now how to enable cascade deletes?
April 29, 2010 at 7:21 am
Grant
Im trying to use your statement:
But when I run the below code I get the error:
"Must declare the scalar variable "@CUTOFFDATE".
declare @DaysToRetainSMALLINT
DECLARE @cutoffdate DATE
SET @daystoretain = '1'
SET @cutoffdate = '12/01/2010'
SELECT@CUTOFFDATE...
April 29, 2010 at 7:19 am
I thought about cascade
How do I use cascade in my senario?
April 29, 2010 at 6:43 am
Thanks Grant
Is there a way to put all thre into one statement?
April 28, 2010 at 1:28 pm
me 2 talkto lee..
all it takes is that one time when you can't re-attach and you'll always use a bak
April 16, 2010 at 1:17 pm
if you write out the join in sql, you'll most likely see that your parent and child records don't match/or missing record(s)...hence your issue.
April 16, 2010 at 1:14 pm
Declare @retValue int
EXEC @retValue = msdb.dbo.sp_start_job @job_name = 'packagename'
If @retValue = 1
Raiserror ('Failed to start [packagename]', 16, 1, null)
April 16, 2010 at 11:53 am
I have had issues with a re-attach...
There is no guarantee on a re-attach so I would always use the bak file.
April 16, 2010 at 8:26 am
Viewing 15 posts - 406 through 420 (of 600 total)