Sql Query Problem

Joined
Dec 20, 2006
Messages
19
I have written I stored procedure and it works but it is giving me warnings. The warnings it is giving me are as follows:

Warning: The table #HEADERINFO has been created but its maximum row size (8435) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.

(1 row(s) affected)


(3 row(s) affected)

Warning: The table #HEADERINFO has been created but its maximum row size (8435) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.

(17 row(s) affected)

Warning: The table #HEADERINFO has been created but its maximum row size (8435) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.

Warning: The table #MasterTable has been created but its maximum row size (10444) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.

(17 row(s) affected)

Warning: The table #HEADERINFO has been created but its maximum row size (8435) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.

Warning: The table #MasterTable has been created but its maximum row size (10444) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.

Warning: The table #HEADERINFO has been created but its maximum row size (8435) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.

Warning: The table #MasterTable has been created but its maximum row size (10444) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.

(17 row(s) affected)

Any help with this warnings would be greatly appreciated.
 
In SQL 2000 the maximum size a single row can hold is approx 8k (8060 bytes being the exact value). Although an individual field such as a varchar, char etc. can hold up to 8000 bytes you are still held to the maximum of 8060 for the entire row.

i.e. If you have a table
Code:
CREATE TABLE Test
{
FirstName varchar(8000),
LastName varchar(8000)
}
The total number of bytes you can use is 8060 - even though it looks like you could reach 16000 (8000 per field).
 
Back
Top