Forum Replies Created

Viewing 15 posts - 526 through 540 (of 691 total)

  • RE: Honey, I Enlarged the Database!

    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...

  • RE: demo db

    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...

  • RE: Design question

    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...

  • RE: getting cumulative values

    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...

  • RE: Which WHERE condition9s) were satisfied

    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%')...

  • RE: Enhance Stored Procedure

    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) >...

  • RE: Honey, I Enlarged the Database!

    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...

  • RE: Collation Sequence and Table Variables

    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...

  • RE: PRIMARY KEY/NOCHECK

    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...

  • RE: Enhance Stored Procedure

    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...

  • RE: Honey, I Enlarged the Database!

    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...

  • RE: TRIGGERS AND PERFORMANCE

    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,...

  • RE: TRIGGERS AND PERFORMANCE

    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...

  • RE: Honey, I Enlarged the Database!

    Look up DBCC SHRINKDATABASE and DBCC SHRINKFILE in BOL.

  • RE: Tracking database size

    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...

Viewing 15 posts - 526 through 540 (of 691 total)