Viewing 15 posts - 136 through 150 (of 151 total)
mipo, Could you do the deletes in several, smaller batches?
WHERE DateDiff(mm,transactiondatestamp,GetDate()) = 4
.
.
WHERE DateDiff(mm,transactiondatestamp,GetDate()) = 3
Or, if it's particularly large, maybe do DateDiff(dd,transactiondatestamp,GetDate()) = 90,...
April 10, 2003 at 2:50 pm
We do this all the time at this company. The only diff I can see between what you're doing and what we do is:
ftp -s:D:\filepath\scriptfilename.txt http://ftp.site.com
No quotes around...
April 10, 2003 at 10:55 am
Robby,
Yeah... looks like T-SQL doesn't like function calls in proc declarations. I didn't know that. You could set the date to GetDate() after the parameter declarations:
April 10, 2003 at 10:38 am
R, can you reference the @@PROCID global variable in the INSERT statement within the trigger?
INSERT INTO <logtable>
...
April 10, 2003 at 10:07 am
Nickel, David's got the goods on this one! The only thing I'd add is consider an index on your startTime column. Also, if you're concerned with fractional results, maybe use...
April 10, 2003 at 9:38 am
Nickel, to answer your second question, I cut and pasted the code for the second query from an existing proc on one of our databases. We use the WITH (NOLOCK)...
April 10, 2003 at 8:40 am
Ah, yes. To get average you were looking for...
SELECTYear(startTime),
Month(startTime),
Day(startTime),
Count(*)
FROMDQCaseStartTime WITH (NOLOCK)
GROUP BYYear(startTime),
Month(startTime),
Day(startTime)
COMPUTEAvg(Count(*))
SJTerrill
April 9, 2003 at 1:01 pm
Do you need to show days with 0 cases? If not...
SELECT Year(startTime),
...
April 9, 2003 at 12:55 pm
Hans, I didn't make it clear what I was responding to.
Billy's post indicated a dilemma over sparsity of data. Though the temp table approach is definitely more intensive I/O-wise, it...
April 4, 2003 at 6:31 pm
Apologies in advance if I'm over-simplifying this (I'm not much on finance).
CREATE TABLE#Performance
(
Entityvarchar(40),
ThisDaysmalldatetime,
PreviousDaysmalldatetime,
Performancefloat
)
INSERT INTO#Performance
(
Entity,
ThisDay,
PreviousDay
)
SELECTPER1.Entity,
PER1.ThisDay,
Max(PER2.ThisDay) 'PreviousDay'
FROMtblPerformance PER1
LEFT OUTER JOIN
tblPerformance PER2
ON...
April 4, 2003 at 10:43 am
One more hand up to agree with click-fund's take on the aesthetics of SET and SELECT
quote:
The reason I don't encourage this is...
April 4, 2003 at 8:17 am
Could you create a proc that gets kicked off as part of a daily job that inserts a 0 quantity record for yesterday if there's no record for yesterday? If...
April 3, 2003 at 3:47 pm
Is there any way you can increase the width of the resulting number from 5 to, say, 10? And the underlying column, of course.
SET @PalNumLen...
April 3, 2003 at 3:04 pm
Viewing 15 posts - 136 through 150 (of 151 total)