Create a dynamic script to create view for all tables having MAX columns

  • ScottPletcher wrote:

    CREATE VIEW must be in a batch by itself, i.e., without GOs, you could create only one view per script.

    Since GOs are likely not valid, that may be what you have to do.

    Or create the view using dynamic SQL

  • Bumping the previous post so that it actually shows up because of the "first post on a page" problem they haven't fixed on this forum yet. 🙁

    --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)

Viewing 2 posts - 16 through 16 (of 16 total)

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