Forum Replies Created

Viewing 15 posts - 16,621 through 16,635 (of 26,489 total)

  • RE: How do I show items dated 1 day from current date?

    Looking at your code, this:

    RIGHT OUTER JOIN dbo.EventDescription ED ON DEP.EventID = ED.EventID

    should probably be this:

    LEFT OUTER JOIN dbo.EventDescription ED ON DEP.EventID = ED.EventID

    As this:

    dbo.DefendantEventPros DEP is on the...

  • RE: TempDB Shrinking

    CirquedeSQLeil (3/9/2010)


    Vivek29 (3/9/2010)


    Run this before performing shrink operation.

    Use tempdb

    go

    DBCC FREESYSTEMCACHE(ALL);

    DBCC FREESESSIONCACHE;

    then perform your shrink operation.

    Thanks

    Vivek

    Why?

    Agree, why would you do that on a production server?

  • RE: Are the posted questions getting worse?

    CirquedeSQLeil (3/9/2010)


    Lynn Pettis (3/9/2010)


    I think it's time for trip to the desert. Anyone care to join me? I'll put the hippo on a leash. 😛

    Care to enlighten us?

    Sure,...

  • RE: Are the posted questions getting worse?

    I think it's time for trip to the desert. Anyone care to join me? I'll put the hippo on a leash. 😛

  • RE: Normalization of Date

    arun.prakash (3/9/2010)


    I am only interested in 2 columns here :

    _Addwhen - format is 20100303 9:41:3000

    Normalized_Add_When - format should be format is 20100303 9:45 (after I run my stored procedure)

    The other...

  • RE: Normalization of Date

    Well, your insert statement isn't working on my server.

  • RE: Normalization of Date

    Also, what column should be updated and what should it look like when completed?

  • RE: Normalization of Date

    Did you test the code you posted on your system. Things don't look right once I reformat the code.

  • RE: Normalization of Date

    arun.prakash (3/9/2010)


    Thanks Lynn,your code works perfectly but how do I use it in my current code:

    here is my set statement :

    declare @ sql nvarchar(500)

    set @sql='update XXNkk_Fact_PnLSummary1 set [' + @colname...

  • RE: Should I Backup The Systems DBs and If so Which ones and why

    GilaMonster (3/9/2010)


    Yes. Say there's a single drive failure, or database corruption, or someone stops SQL and deletes one of the files belonging to a system DB. Restoring from backup is...

  • RE: Normalization of Date

    Does the following code help you?

    declare @TestTime datetime;

    set @TestTime = convert(datetime, '0:14:00', 108);

    select @TestTime, dateadd(ss,((datediff(ss, dateadd(dd, datediff(dd, 0, @TestTime), 0), @TestTime) + 450) / 900) * 900, dateadd(dd,datediff(dd, 0, @TestTime),...

  • RE: Normalization of Date

    Could you please define your rounding rulles? When to round up and when to round down.

  • RE: sp_send_cdosysmail supported in SQL 2008?

    Can't answer your question about sp_send_cdosysmail, but I would suggest looking at Database Mail.

  • RE: How do I show items dated 1 day from current date?

    I'd need to review the code again to be sure, but if the query is returning the appropriate data, then you should have it right.

  • RE: Should I Backup The Systems DBs and If so Which ones and why

    Simple answer, yes. The only system database you can't backup is tempdb, which makes sense as it is recreated every time you restart SQL Server.

    As to frequency, that would...

Viewing 15 posts - 16,621 through 16,635 (of 26,489 total)