Forum Replies Created

Viewing 15 posts - 46 through 60 (of 149 total)

  • RE: In-line variable assignment 2

    I'm happy with the explanation, but feeling confused due to BOL:

    After declaration, all variables are initialized as NULL, unless a value is provided as part of the declaration.

  • RE: The Great Escape

    My point of view, assume things is never good enough. What if Microsoft decides to change the factory settings?

    In my oppinion declaration is the perfect way to choose.

  • RE: The Great Escape

    It would be better to define the collation. If it's case sensitive, then 'Tea' will not match 'tea'. 😛

  • RE: CTE DML

    I hate DISTINCT *

    😛

  • RE: TABLESAMPLE output

    Nice question!

    But i can't get the purpose of this.

    How can an unpredictable option be useful?:-D

  • RE: Schema & Renaming Fun

    Hmmm.

    According to BOL 'not.funny' should be treated as a failure:

    [ @newname = ] 'new_name'

    Is the new name for the specified object. new_name must be a one-part name and must follow...

  • RE: sum negative and positive on same row.

    Instead of that:

    invoiceitems.invoicetype,

    sum(CASE WHEN invoiceitems.invoicetype = 'SCRN' THEN ABS(invoiceitems.homenettvalue) *-1

    ELSE invoiceitems.homenettvalue END) as SumPrice,

    sum(CASE WHEN invoiceitems.invoicetype = 'SCRN' THEN ABS(invoiceitems.homenettvalue) *-1

    ELSE 0.00 END) as SumCredit,

    sum(CASE WHEN invoiceitems.invoicetype = 'SCRN' THEN...

  • RE: Logic Precedence

    An easy one. Thanks!

  • RE: Unravel Some Complex IF Logic

    An easy task for 3 points! 🙂

    We have learned to explicitly terminate each possible flow of the code.

  • RE: How to re-write the query

    SELECT

    p.*

    FROM

    personnel p inner join

    coordinators c on p.Office=c.Office_code

    As you are seeking an employee of the coordinators table between all employees in the coordinators table, the second...

  • RE: Order My Data

    If i need a specific order i'll use ORDER BY. It's the clearest method to avoid future problems. 😎

  • RE: Using Max()

    A good back to basics question. Thanks!

  • RE: Parameter sniffing

    Is it a useful knowledge?

  • RE: Variable Declaration

    Good question! Learned something. Parsing does not set initial values! 🙂

  • RE: Between & Collation

    And why is BETWEEN checked regardless of the collation?

    If lowercase characters sort ahead of uppercase ones, then 'B' is greater then 'd', and BETWEEN can't evaluate to TRUE! Like...

Viewing 15 posts - 46 through 60 (of 149 total)