• tinausa - Wednesday, June 28, 2017 2:47 PM

    Thanks for confirming what I was thinking. Then is there a way that I can force the order? 
    ORDER BY would not work given the names but is there a way I can create something like an array and use that in the cursor?
    Tahbnks.

    If the views are in order by their object_id in sys.views, you can at it as an additional column in the temp table and sort by that... Just an idea.