Forum Replies Created

Viewing 15 posts - 5,431 through 5,445 (of 7,614 total)

  • RE: my trigger does not update datetime?

    Is ProdId a guaranteed unique value in ProductsL1? The error message indicates that the trigger might be trying to UPDATE more than one row.

  • RE: Always set a Field to NULL - is a trigger the answer

    I'd stick with the AFTER trigger. Your initial trigger was pretty much spot on.

    In case you create other AFTER triggers later, you might want to explicitly designate that trigger...

  • RE: Help needed in Performance Tuning

    Jeff Moden (1/26/2015)


    ScottPletcher (1/26/2015)


    dwain.c (1/25/2015)

    coalesce(a.processStatus, 0) = 0

    is not SARGable, so that could be improved on by making the processStatus column NOT NULL.

    It's much better to code it as:

    (a.processStatus...

  • RE: Help needed in Performance Tuning

    dwain.c (1/25/2015)

    coalesce(a.processStatus, 0) = 0

    is not SARGable, so that could be improved on by making the processStatus column NOT NULL.

    It's much better to code it as:

    (a.processStatus is null or...

  • RE: ID or Id

    g.britton (1/26/2015)


    Jeff Moden (1/24/2015)


    RonKyle (1/24/2015)


    What are the issues with DATETIME2 and DATEDIFF?

    Simple. Given a single row that contains StartDate and EndDate columns as DATETIME2 columns, write the code to...

  • RE: ID or Id

    TomThomson (1/23/2015)


    ScottPletcher (1/23/2015)


    TomThomson (1/23/2015)


    Sean Lange (1/23/2015)


    Eric M Russell (1/23/2015)


    Date/Time: datetime, offset, varchar?

    There is only one option here. Datetime.

    I suppose if your dBMS is anccient enough that's excusable. But...

  • RE: ID or Id

    TomThomson (1/23/2015)


    Sean Lange (1/23/2015)


    Eric M Russell (1/23/2015)


    Date/Time: datetime, offset, varchar?

    There is only one option here. Datetime.

    I suppose if your dBMS is anccient enough that's excusable. But it probably...

  • RE: Where can I find the definistion of this table value function

    MMartin1 (1/23/2015)


    EXEC SP_HELPTEXT 'schema.viewName';

    This formats the output across multiple lines rather than just one. I find it way handier when copying long definitions to the SSMS window.

    True; it's easier to...

  • RE: ID or Id

    I'm stunned Celko hasn't weighed in and told us how to name things properly rather than relying on punched cards and tape naming!

  • RE: ID or Id

    Phil Parkin (1/23/2015)


    ScottPletcher (1/23/2015)


    Phil Parkin (1/23/2015)


    Steve Jones - SSC Editor (1/23/2015)


    I tend to use ID, but that's I think my OCD coming in. ID is an acronym. Product is a...

  • RE: ID or Id

    Phil Parkin (1/23/2015)


    ScottPletcher (1/23/2015)


    Phil Parkin (1/23/2015)


    Steve Jones - SSC Editor (1/23/2015)


    I tend to use ID, but that's I think my OCD coming in. ID is an acronym. Product is a...

  • RE: ID or Id

    I think it's just that some company -- probably Microsoft -- did it in some of their early tables and people copied it without reflecting on whether it needed changed...

  • RE: ID or Id

    Phil Parkin (1/23/2015)


    Steve Jones - SSC Editor (1/23/2015)


    I tend to use ID, but that's I think my OCD coming in. ID is an acronym. Product is a word.

    ProductId would look...

  • RE: ID or Id

    I don't get why just "ID" is fully capitalized. Why not "addr"?

    Why is it:

    ProductID

    but:

    ProductAddr

    rather than:

    ProductADDR

    Why selectively capitalize just one abbreviation? Why the inconsistency?

  • RE: ID or Id

    I prefer product_id. Using mixed case is a real p.i.t.a. on a case-sensitive server!!

    But, ProductId seems right to me if you're going to camel case.

    For example, say you had...

Viewing 15 posts - 5,431 through 5,445 (of 7,614 total)