By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,410 Members | 1,626 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,410 IT Pros & Developers. It's quick & easy.

how to create a real (not virtual) table from view1 & view2 ni sql server?

P: n/a
Hello all,
my question might be trivial but since my background isn't DB i'll dare
to ask it any way:

how to create a real (not virtual) table from view1 & view2 ni sql
server?

what should i do specificly in the sql server application & what is the
syntax for that?

i thank all of you,
groupy.

May 11 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
hi,
groupy wrote:
Hello all,
my question might be trivial but since my background isn't DB i'll
dare to ask it any way:

how to create a real (not virtual) table from view1 & view2 ni sql
server?

what should i do specificly in the sql server application & what is
the syntax for that?

i thank all of you,
groupy.


what you are asking is potentially dangerorus...
you can achieve the desired result UNIONing the desired views specifying the
INTO clause of the SELECT statement, thus effectively creating a new base
table with the output of the SELECT statement... constraints and indexes
associated with the base objects will not be generated, but as you are in
this case dealing with views, chances are that non keys nor indexes are
present...
the dangerous part is about persistency of the new table... it will not be
updated as the base tables of the referencing views will be...
thus what you are getting is a static snapshot f the point in time you
"created" your new table...
and, except perhaps for reporting tasks, I actually do not see a reason to
perform this operation as you are actually doubbling storage requirements,
you are breaking normalization and so on... again, I can see only a static
reporting requirement, say you need to have a point in time "view" of your
sales, and you need it all a month long, then you can do it, regenerating
this dump (but real) table at each month beginning...

http://msdn.microsoft.com/library/de...a-ses_9sfo.asp
http://msdn2.microsoft.com/en-us/library/ms190750.aspx
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org
DbaMgr2k ver 0.18.0 - DbaMgr ver 0.62.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--------- remove DMO to reply
May 11 '06 #2

P: n/a
Dear Andrea ,
Thanks alot for your quick answer.
You helped me a lot to understand the situation.

Groupy.

May 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.