The Complex Computed Column

  • Comments posted to this topic are about the item The Complex Computed Column

  • This took me down a rabbit hole of computed column research. I ended up finding the answer in one of your blog posts from 2011!

    Now I'm wondering if computed columns might be useful in my data warehousing world.

    So a good question, thank you 🙂

  • Glad you liked it. If you find a good, specific use, would love a short 1-2 page article on the way you use a computed column. Always good to help others think with a specific scenario.

  • damnit... I use these almost every day and I still got it wrong (I don't cheat and run the code)

    we use persisted computed columns in so many areas - one of the key ones is address labels

    if we insert a customer  using the format

    firstname, lastname, house number, streetname, city, county, postcode

    what's the point in having a function that concatenates those values with line endings... a customer will have many orders (our customers are commercial - one of them has put millions of orders through)

    so you create a persisted computed column that stores a pre-formatted address label - "WORM" write once , read many

    we do the same thing with stock value - qty*price there's no point calculating it over and over again

    MVDBA

  • Nice question, thanks Steve

    ____________________________________________
    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    “libera tute vulgaris ex”

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply