Forum Replies Created

Viewing 15 posts - 3,376 through 3,390 (of 6,036 total)

  • RE: Bcp Problem

    It's bcp thing.

    I've got similar problem recently.

    My reporting procedure created and populated table #Result.

    Last statement was

    SELECT * FROM #RESULT

    Depending on parameters (mainly @ReportNo) table #Report had different columns.

    Everything worked...

    _____________
    Code for TallyGenerator

  • RE: Adding workdays

    When I was sick I was better.

    :hehe:

    Return to the original version:

    [Code]

    IF OBJECT_ID('dbo.fnAddWeekdays_Sergiy','fn') IS NOT NULL

    DROP FUNCTION dbo.fnAddWeekdays_Sergiy

    GO

    CREATE FUNCTION dbo.fnAddWeekdays_Sergiy (@Start DATETIME, @Days INT)

    RETURNS DATETIME

    AS

    BEGIN

    DECLARE @End DATETIME

    ...

    _____________
    Code for TallyGenerator

  • RE: EM errors

    hot2use (10/24/2007)


    Hi there

    I'm not sure if this is what you are looking for ...

    SQL Server Management Studio just does not have Taskpad at all.

    That's negative, not positive side of this...

    _____________
    Code for TallyGenerator

  • RE: Adding workdays

    Tomm Carr (10/23/2007)


    I've decoupled my BizDaysAdd routine from the BizDaysBetween routine (it was originally meant as merely as a test, anyway). The result follows. I really don't see how it...

    _____________
    Code for TallyGenerator

  • RE: Adding workdays

    [Code]select dbo.BizDaysAdd ('2007-10-20', 260) -- should be '2008-10-20' (52*5=260)

    [/Code]

    Actually 1 year normally contains 52 weeks AND 1 day (2008 contains 52 weeks and 2 days).

    😀

    should be '2008-10-18' (52*5=260)

    _____________
    Code for TallyGenerator

  • RE: Adding workdays

    Tomm Carr (10/23/2007)


    Ok, fine. If you don't want to take the trouble to tweak it, I guess I will. It is my code, I suppose, so who better?

    If we compare...

    _____________
    Code for TallyGenerator

  • RE: EM errors

    Chris Hedgate (7/25/2005)


    You will not see this error in SQL Server 2005, since SQL Server 2005 does not have Enterprise Manager.

    No applications - no errors.

    I should think about this way...

    _____________
    Code for TallyGenerator

  • RE: Trigger Issues

    tjames (10/23/2007)


    I have figured out the issue. I changed the trigger.

    CREATE TRIGGER trg_#1 ON dbo.table1

    FOR UPDATE

    AS

    IF UPDATE( dtmDateApproved)

    BEGIN

    INSERT INTO tbl_table2(table1ID)

    SELECT DISTINCT...

    _____________
    Code for TallyGenerator

  • RE: Adding workdays

    Tomm Carr (10/23/2007)


    On my server it means Monday, not Sunday.

    That's fine, use the values that match your server or DateName() instead. Remember, these routines were developed to meet in-house needs....

    _____________
    Code for TallyGenerator

  • RE: Adding workdays

    Michael Meierruth (10/23/2007)


    Sergiy (10/22/2007)


    if DatePart( dw, @StartDate ) = 1 -- Sunday

    On my server it means Monday, not Sunday.

    I think...

    _____________
    Code for TallyGenerator

  • RE: Pivot Table Help Needed

    Peter Larsson (10/23/2007)


    Jeff, excellent code but I think you should start using QUOTENAME function for those having brackets, spaces or even single quotes in their table/column names.

    It doesn't make any...

    _____________
    Code for TallyGenerator

  • RE: Adding workdays

    if DatePart( dw, @StartDate ) = 1 -- Sunday

    On my server it means Monday, not Sunday.

    _____________
    Code for TallyGenerator

  • RE: Adding workdays

    I said - I could not test.

    There was a typo in the formula.

    Also I corrected small logical error in the code:

    [Code]

    IF OBJECT_ID('dbo.fnAddWeekdays_Sergiy','fn') IS NOT NULL

    DROP FUNCTION dbo.fnAddWeekdays_Sergiy

    GO

    CREATE FUNCTION dbo.fnAddWeekdays_Sergiy (@Start...

    _____________
    Code for TallyGenerator

  • RE: how to remove numbers from strings?

    David McFarland (10/22/2007)


    The clustered index scan is basically the same thing, as the leaf level nodes are simply the data.

    Then what's is "not-basical" difference you aware of?

    This is a...

    _____________
    Code for TallyGenerator

  • RE: how to remove numbers from strings?

    David McFarland (10/22/2007)


    Sergiy (10/22/2007)


    Do you know the difference between table scan and clustered index scan?

    Sure do (you really don't want to go here, but feel free to continue). Do you...

    _____________
    Code for TallyGenerator

Viewing 15 posts - 3,376 through 3,390 (of 6,036 total)