February 13, 2010 at 7:05 am
I have 2 databases. I need to create all the views from database1 to database2. There are total 800 views and some views depend on other views.
Example : viewA is used in ViewB. If ViewB is first executed i am getting invalid object name viewA.
Is there any way, I can create all the views without error ? Some times the underlying tables may not be existing while creating views.
Thank you for your help.
February 13, 2010 at 7:03 pm
Ummmm.... so what do you want to do if the underlying tables don't exist?
--Jeff Moden
Change is inevitable... Change for the better is not.
February 13, 2010 at 10:12 pm
thank you for your reply jeff. underlying tables will be created later. Actually underlying tables is not my major problem. I can create all tables before executing views script. At present we are using SQLCompare to create views and its creating all views without errors. So there must be some way we can create all the views without refering to underlying views. OR is SQLCompare identifying the base views and creating them first to supress errors ? In future we dont want to use SQLCompare.
February 13, 2010 at 10:43 pm
SQL Compare does something in the background to check dependencies. You could probably do something similar but, I have to ask, why don't you want to use SQL Compare to do this? It's easy, accurate, and already paid for.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply