Viewing 15 posts - 526 through 540 (of 691 total)
Hoo-t,
It says "data", not "logs" -- note I suggested that the OP use it to shrink the log file.
I can guarantee that my log files are still 100% operational after...
November 3, 2004 at 5:15 pm
Create a table for names, using your favorite (or least favorite) celebrities. Ask everyone in your office to contribute some names. Put it all in a table.
Then simply...
November 3, 2004 at 9:53 am
Sounds good to me so far, but why are you relating phones to addresses rather than phones to people? Mobile phones aren't address-based, and when people move they can...
November 3, 2004 at 9:51 am
I think this should do it:
SELECT A.ID,
A.SecondaryId,
A.Value,
SUM(B.Value) AS CumulativeValue
FROM YourTable A
JOIN YourTable B ON B.Id <= A.Id
AND ((B.Id = A.Id AND B.SecondaryId <= A.SecondaryId) OR (B.Id < A.Id))
GROUP...
November 3, 2004 at 9:46 am
SELECT MyName, MyBirthDate,
CASE WHEN MyName LIKE 'David%' THEN 1 ELSE 0 END AS NameMatched,
CASE WHEN MyBirthDate = '10-10-1950' THEN 1 ELSE 0 END AS BirthDateMatched,
...
FROM Employees
WHERE (MyName LIKE 'David%')...
November 3, 2004 at 9:41 am
Personally, I would get rid of the temp table and just do:
Update Table1
Set StartAt =
(
Select case when Sum(D01) > 0 Then 1
when Sum(D02) > 0 Then 2
when Sum(D03) >...
November 3, 2004 at 9:37 am
Neither of those are true. Try using EMPTYFILE and see if your log files are really unusable.
Next, read this article, which proves that you the log file will grow...
November 3, 2004 at 9:32 am
Stewart,
I believe that the table variable will, by default, use the collation from TEMPDB.
You should be able to fix this by defining the collation within the creation of the table...
November 2, 2004 at 10:17 am
I'm a bit confused by your post; what is the problem here? The PK -- at least on my end when I run the DDL (SS2000SP3a) -- is still...
November 2, 2004 at 10:14 am
What reasons?
There is almost never a good reason to use a cursor, especially in SQL Server 2000, with UDFs, etc.
If you want to get rid of it, please post more...
November 2, 2004 at 10:11 am
Sean,
To get a database to minimum size, I usually rebuild all of the indexes first ( sp_msforeachtable 'dbcc dbreindex(''?'')' ), then shrink the data file(s) ( run sp_helpfile to get...
November 2, 2004 at 10:07 am
Regardless of whether or not auto close is set, that loop in your trigger is extremely expensive, and will happen on every INSERT. That's going to slow things down,...
November 2, 2004 at 10:02 am
Can you expand upon the business purpose of what this trigger is doing? Why is the number 178560 important? Why are you re-inserting rows into the table, then...
November 1, 2004 at 11:31 am
Look up DBCC SHRINKDATABASE and DBCC SHRINKFILE in BOL.
November 1, 2004 at 11:28 am
You can't do that as-is; sp_spaceused returns two result sets and is therefore unavailable for the INSERT .. EXEC syntax. Your best bet is probably to re-write sp_spaceused and...
November 1, 2004 at 11:27 am
Viewing 15 posts - 526 through 540 (of 691 total)