Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create table based on view

Status
Not open for further replies.

mflancour

MIS
Apr 23, 2002
379
US
How would I create a table and place data into that table from an existing view?
 
Looks like this will work great ...excep, I must have a larger than normal dataset as I am receiving the following error:


Server: Msg 1701, Level 16, State 2, Line 1
Creation of table 'stuff1' failed because the row size would be 8239, including internal overhead. This exceeds the maximum allowable table row size, 8060.

Any way around this?
 
a row in SQL server can onlyb be 8060 bytes (not including text and other BLOBs)
your view is a combination of several tables all these column combined are to wide to fit on a 8K page
Eliminate some columns by using a column list instead of *



Denis The SQL Menace
SQL blog:
Personal Blog:
 
Sounds about right...I'm thinking I'm not getting the right error though because I have exacly 24 columns in the query most of wich are number fields, but even if I apply a 255 average size to all columns that's still only around 6200. Could it be something else?
 
well, I found the problem...but not the solution yet.. I have a field that is for some reason being set to varchar 8000 when it creates the table. Any ideas on how to fix, what is causing this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top