Forum Replies Created

Viewing 15 posts - 2,236 through 2,250 (of 3,348 total)

  • RE: Computed Columns 1

    Peter Trast (2/7/2012)


    I cannot think of a real world example right now where this would make sense.

    Real-world examples are easy enough to find. For instance, the current balance of an...

  • RE: TRUNCATE TABLE and ROLLBACK TRAN

    GilaMonster (2/6/2012)


    Is it bad form, if you create a QotD, to list your own article as a reference?

    If it's a good article? No, not at all. I've done it in...

  • RE: Aggregate Function Product()

    Stephen.Rice (2/6/2012)


    And another way to deal with 0 and negatives it if you don't want to use a 'case' statement :

    MIN(ABS(SIGN(num))) * (1-(SUM(SIGN(num) * (SIGN(num) -1))%4)) * POWER(10.,SUM(LOG10(ABS(Num) + 1...

  • RE: Aggregate Function Product()

    SQL Kiwi (2/6/2012)


    We use a CLR aggregate for this.

    That's definitely cleaner, and easier to understand code. But how does the performance of a CLR aggregate compare to performance of a...

  • RE: Aggregate Function Product()

    archie flockhart (2/6/2012)


    Presumably also, you'd need to be aware of the number of values and size of values that are expected - it wouldn't take very many numbers multiplied together...

  • RE: TRUNCATE TABLE and ROLLBACK TRAN

    Stewart "Arturius" Campbell (2/6/2012)


    vk-kirov (2/6/2012)


    Hugo Kornelis (2/6/2012)


    And 34% of them are for "you can never rollback a truncate table statement"

    Maybe they are Oracle refugees? :hehe: http://www.sqlservercentral.com/articles/Raw+Materials/71108/

    A TRUNCATE can be rolled...

  • RE: TRUNCATE TABLE and ROLLBACK TRAN

    I wanted to comment that this question is superfluous, that everyone knows this. But.....

    At the time of writing:

    "Incorrect answers: 56% (52)"

    And 34% of them are for "you can never rollback...

  • RE: Aggregate Function Product()

    I just saw the answer by Mike. I like the more compact way to get the multiplication factor (CHECKSUM_AGG), but I'm also a bit concerned - I could not find...

  • RE: Aggregate Function Product()

    The method in the article is only good for positive (>0) values. Here is a formula that works for zeroes and negatives as well:

    COALESCE(EXP(SUM(LOG(ABS(NULLIF(val, 0))))),0) * (1 - 2 *...

  • RE: Querying Geometry Information

    L' Eomot Inversé (2/3/2012)


    so what is the correct case mixture? Presumably "geometry" going by Hugo's note, which seems to make SQL Server's type naming a bit inconsistent.

    Yep, "geometry" (all lowercase)...

  • RE: Querying Geometry Information

    And this, dear friends, is why everyone working with SQL Server should be forced to do all development and testing on an instance and in databases with a case-sensitive collation.

    SELECT...

  • RE: SET option hierarchy

    cfradenburg (2/2/2012)


    zerko (2/1/2012)


    OK now I'm really confused

    I'm guessing you didn't read the thread. Any time there's something wrong in the question it gets discussed thoroughly. If you read...

  • RE: Computed Columns 1

    L' Eomot Inversé (1/31/2012)


    So bitbucket has not asked the question he meant to ask, but a different (and easier) question: "can a persisted columns support foreign key constraints?".

    :laugh:

    Just...

  • RE: Computed Columns 1

    Meh, I don't like questions where people who really understand the subject have a 50/50 chance of getting it right because they have to second-guess the author's intention.

    "Is this a...

  • RE: XML to Relational

    I knew I'd probably get this wrong, as I know very little about XML, and I'm not actively seeking to change that. But from what I picked up over time...

Viewing 15 posts - 2,236 through 2,250 (of 3,348 total)