Dynamic SQL to create 300 Views from our Tables

Bobby P 221 Reputation points

We have a requirement to create over 300 VIEWs from our Database Tables. Straight SELECT * from the Table.

I was planning on doing this using Dynamic SQL but I know I will exceed the implied space limit on the dynamically built SQL Variable.

Does anyone have a suggestion as to how to approach this?

I think I saw in my travels that using OPENQUERY may be an option. But I know I will have to create a script in our environment for SDLC purposes.

Thanks in advance for your review and am hopeful for a reply.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,338 questions
{count} votes