SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old June 11th, 2001, 06:35 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Converting a view into a table.

<i><b>Originally posted by : Padmaja Tallavajhala (coolpersona@hotmail.com)</b></i><br />I want to know how to create a table from a view. I currently use SQL Server 7.0 and I have a view. But I want to know how to convert this into a table so that I can copy this table to an access database.<br /><br />Hope to hear soon from somebody.<br />Regards,<br />Padmaja.<br />

Reply With Quote
  #2  
Old June 11th, 2001, 07:10 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Graham Masters (graham_masters@yahoo.com)</b></i><br />If this is a one time or infrequent event then simply create a staging table using a SELECT …INTO statement. Thus if your view is called X then type in ISQL or Query Analyzer:<br /><br />SELECT * INTO TEMP from X<br /><br />This statement will both create the table TEMP and copy the rows from X.<br /><br />TEMP is now the table you can save to Access. After saving remember to:<br /><br /> DROP TABLE TEMP<br /><br /><br /><br /><br />------------<br />Padmaja Tallavajhala at 6/11/2001 4:35:01 PM<br /><br />I want to know how to create a table from a view. I currently use SQL Server 7.0 and I have a view. But I want to know how to convert this into a table so that I can copy this table to an access database.<br /><br />Hope to hear soon from somebody.<br />Regards,<br />Padmaja.<br />

Reply With Quote
  #3  
Old June 12th, 2001, 10:06 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Padmaja Tallavajhala (coolpersona@hotmail.com)</b></i><br />Hi Graham,<br /><br />Thanks for the suggestion. I actually tried your approach and it worked. But I tried with a slight variation.<br /><br />SELECT select_list<br />[INTO new_table_]<br />FROM table_source<br />[WHERE search_condition]<br />[GROUP BY group_by_expression]<br />[HAVING search_condition]<br />[ORDER BY order_expression [ASC | DESC] ]<br /><br />I mentioned all the column names from the view name instead of selecting * as I wanted only selected information to show to in the new table.<br /><br />Regards,<br />Padmaja.<br /><br /><br />------------<br />Graham Masters at 6/11/2001 5:10:27 PM<br /><br />If this is a one time or infrequent event then simply create a staging table using a SELECT …INTO statement. Thus if your view is called X then type in ISQL or Query Analyzer:<br /><br />SELECT * INTO TEMP from X<br /><br />This statement will both create the table TEMP and copy the rows from X.<br /><br />TEMP is now the table you can save to Access. After saving remember to:<br /><br /> DROP TABLE TEMP<br /><br /><br /><br /><br />------------<br />Padmaja Tallavajhala at 6/11/2001 4:35:01 PM<br /><br />I want to know how to create a table from a view. I currently use SQL Server 7.0 and I have a view. But I want to know how to convert this into a table so that I can copy this table to an access database.<br /><br />Hope to hear soon from somebody.<br />Regards,<br />Padmaja.<br />

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > Converting a view into a table.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway