• eashurak (3/6/2015)


    Hi - Hate to review an old thread after so long, but I need to do something similar. In Jeff Moden post on 8/19/2009 1:19:13 AM he uses a process that is great if you know what values are in the field (Apples, Oranges, Lemons), but what if you don't. What if you need to flatten something indeterminate like an Email field?

    Take a look at the article at the first link in my signature line below under "Helpful Links" to post some readily consumable data along with the DDL for a test table and let's get started on your problem.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)