Create invalid view

Last Post 04 Jun 2008 07:09 AM by gilou28. 5 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
gilou28
New Member
New Member

--
03 Jun 2008 05:53 AM
Is there a way to create a view that references non existing objects ?

The FORCE option does not exists in SQL Server (exists in Oracle) that I know. These views need to be created now, the referred tables will exists at runtime. Since there is around 150 of those views and they're using 500 tables, it's not just a question of creating those dummy tables now for the creation of the views.

Maybe the solution lies in inserting directly in the system tables, but I'm sure I will get a lot of "don't do that" from the audience. The argument is not around the reasons, but around the "how".

Bottom line, whatever it takes, I need to do it :-)


Thanks.

gilou28
New Member
New Member

--
03 Jun 2008 06:53 AM
G'morning gunneyk!

The why is too long to explain, simple to say that at execution time, those tables will exists.

Thanks for your reply, but I'm aiming for a direct system table manipulations (I like to live dangerously :-) )



gilou28
New Member
New Member

--
04 Jun 2008 07:09 AM
Sadly;-(

gilou28
New Member
New Member

--
09 Jun 2008 06:49 AM
Hi Pro Pete!

Do you have the list of those system tables that are involved in view definition ? I don't mind complex, just some "orientation" on the involved system tables.

As for executing the script just before the tables are created, the tool (client tool) that is used has a problem with the fact that the view do not exists, but could care less about the status.

Thanks.
gilou28
New Member
New Member

--
09 Jun 2008 09:05 AM
You little curious :-)

I can tell you, but I'll have to kill you after :-)
Enough to say that nobody will gain from the explanation, at least knowledge wise.

Thanks for the starting point with sys tables.





gilou28
New Member
New Member

--
12 Jun 2008 06:32 AM
Yep, I taught of that, but I could also create the underlying tables the same way (temporarely) Since I have about 150 views that are based on 500 tables, the idea is to avoid the creation of those tables or functions... The select statements are far from simple selects.

Thanks anyway.
You are not authorized to post a reply.

Acceptable Use Policy