Check out this:
Dynamic SQL to create 300 Views from our Tables
Bobby P
231
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 | Other
14,502 questions
1 answer
Sort by: Most helpful
-
Jingyang Li 5,896 Reputation points Volunteer Moderator
2023-05-19T16:18:47.19+00:00