Forum Replies Created

Viewing 15 posts - 4,531 through 4,545 (of 7,614 total)

  • RE: Trigger doesnot update last record

    Not sure why the "last row" wasn't affected, since that trigger's going to update every row, which you don't want. You need to join to the inserted pseudo-table to...

  • RE: Help with trigger implementation

    CREATE TRIGGER dbo.tr_Question_Details_Update

    ON dbo.tbl_RF_Questions

    AFTER UPDATE

    AS

    --if no rows affected, exit.

    IF @@ROWCOUNT = 0

    RETURN;

    SET NOCOUNT ON;

    UPDATE CS

    SET [ProgramID] = M.ProgramID,

    ...

  • RE: How to reduce Huge Log File size

    Jeff Moden (12/22/2015)


    WhiteLotus (12/21/2015)


    Sounds good ..I also notice that all databases autogrowth option are 10% . Should I change all of them ?

    If the initial size was 1MB, it takes...

  • RE: How to I getr around the \ issue

    Sergiy (12/22/2015)


    ScottPletcher (12/22/2015)


    Seriously, what is the downside to leaving off the N'? I see none, whether the column is char or nchar. But I see a huge downside...

  • RE: How to I getr around the \ issue

    Sergiy (12/22/2015)


    ScottPletcher (12/22/2015)


    Seriously, what is the downside to leaving off the N'? I see none, whether the column is char or nchar. But I see a huge downside...

  • RE: How to I getr around the \ issue

    Lynn Pettis (12/22/2015)


    ScottPletcher (12/22/2015)


    Lynn Pettis (12/22/2015)


    ScottPletcher (12/22/2015)


    Lynn Pettis (12/22/2015)


    ScottPletcher (12/22/2015)


    Lynn Pettis (12/22/2015)


    ScottPletcher (12/22/2015)


    Of course when scanning the whole table the difference may be rather minor. It's the prevention of...

  • RE: How to convert DOB to age using DateDiff function

    SELECT "Name"."ID", "Name"."LAST_NAME", "Name"."FIRST_NAME", "Name"."EMAIL", "Activity"."ACTIVITY_TYPE", "Activity"."PRODUCT_CODE", "Activity"."TRANSACTION_DATE", "Name"."BIRTH_DATE", DATEDIFF(YEAR, "Name"."BIRTH_DATE", GETDATE()) - CASE WHEN

    CONVERT(char(5), GETDATE(), 101) < CONVERT(char(5), "Name"."BIRTH_DATE", 101) THEN 1 ELSE 0 END AS "AGE"

    FROM "IMIS"."dbo"."Activity"...

  • RE: How to I getr around the \ issue

    Eirikur Eiriksson (12/22/2015)


    ScottPletcher (12/22/2015)


    Edit: Not at all "moving the goalposts". The only reason for the rule is the issue it causes if you get the type wrong, as I...

  • RE: How to convert DOB to age using DateDiff function

    The really tricky part of this is deciding how you want to handle Feb 29 birthdays: in non-leap years, is that birthday Feb 28 or Mar 1? In certain...

  • RE: How to I getr around the \ issue

    Lynn Pettis (12/22/2015)


    ScottPletcher (12/22/2015)


    Lynn Pettis (12/22/2015)


    ScottPletcher (12/22/2015)


    Lynn Pettis (12/22/2015)


    ScottPletcher (12/22/2015)


    Of course when scanning the whole table the difference may be rather minor. It's the prevention of seeks that is...

  • RE: How to I getr around the \ issue

    Eirikur Eiriksson (12/22/2015)


    ScottPletcher (12/22/2015)


    Eirikur Eiriksson (12/22/2015)


    My bad in the post before on the conversion, sorry about that.

    😎

    My point is that incorrect typing and implicit conversions do cause problems, I've lost...

  • RE: How to I getr around the \ issue

    Lynn Pettis (12/22/2015)


    ScottPletcher (12/22/2015)


    Lynn Pettis (12/22/2015)


    ScottPletcher (12/22/2015)


    Of course when scanning the whole table the difference may be rather minor. It's the prevention of seeks that is always the major...

  • RE: How to I getr around the \ issue

    Lynn Pettis (12/22/2015)


    ScottPletcher (12/22/2015)


    Of course when scanning the whole table the difference may be rather minor. It's the prevention of seeks that is always the major concern with implicit...

  • RE: How to I getr around the \ issue

    Eirikur Eiriksson (12/22/2015)


    My bad in the post before on the conversion, sorry about that.

    😎

    My point is that incorrect typing and implicit conversions do cause problems, I've lost count of how...

  • RE: Problem: DELETE table_or_view FROM table_sources removes all rows

    To insure consistency in how the DELETE is done, you should always use an alias for the affected table when using DELETE [table_name] ... FROM ....

    For example:

    DELETE a

    FROM tbl_a a

    <join_type>...

Viewing 15 posts - 4,531 through 4,545 (of 7,614 total)