• CELKO (12/14/2012)


    .. Total failure.. Besides which, I believe my earlier post was the same idea, except coded correctly 🙂 .

    Yeah, it was awful! :crazy:

    What I wanted to do was avoid the CASE expression solution and go for something using functions that compile to simple assembly language.

    DELETE FROM Client_Shares

    WHERE COALESCE (SIGN(ABS(lm_id)+1), 0)

    + COALESCE (SIGN(ABS(ml_id) +1), 0)

    + COALESCE (SIGN(ABS(is_id) +1), 0)

    + COALESCE (SIGN(ABS(t_id)+1), 0) >= 2;

    Yiikes, that's incredibly convoluted. What a royal pita to try to understand, much less change or debug later!!

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".