all groups > sql server new users > november 2006 >
You're in the

sql server new users

group:

What does this mean?


Re: What does this mean? Arnie Rowland
11/13/2006 8:38:30 AM
sql server new users:
That is exactly the reason. You are being warned that it is now possible =
for your application to attempt to store more than 8060 bytes in the =
table row, and that any such attempt will be rejected.

This is not a well designed table (as is often the case with survey =
data). I would suggest that you should break out the comments into =
another table, such as:

CREATE TABLE Survey06Comments
( CommentID int IDENTITY PRIMARY KEY,
SurveyPK int,
CommentType varchar(20)
Comment varchar(8000)
)

Then add the various comments to this table, using CommentType to =
contain the appropriate identifier, i.e., Computers, Training, =
CoWorkers, etc.

--=20
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.=20
Most experience comes from bad judgment.=20
- Anonymous

You can't help someone get up a hill without getting a little closer to =
the top yourself.
- H. Norman Schwarzkopf


[quoted text, click to view]
What does this mean? Jim in Arizona
11/13/2006 9:13:18 AM
I got this warning:

Warning: The table 'survey06' has been created but its maximum row size
(96219) 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.


I'm not sure what this means to me. I've got about 200 employees that
will be filling out a web form that does an insert when they click the
submit button. Is this warning going to pose some unforeseen problem?

What does this warning mean by exceeding a row length of 8060 bytes? Is
it because I'm using varchar(8000) multiple times?

Here's the table I made:

create table survey06
(
PK int identity primary key,
area varchar(30),
population varchar(20),
county varchar(25),
facilities_clean smallint,
facilities_maintained smallint,
facilities_comments varchar(8000),
training_inhouse_helpful smallint,
training_inhouse_adequate smallint,
training_opportunitytoattend smallint,
training_essentallearning smallint,
training_comments varchar(8000),
computers_userfriendly smallint,
computers_internalwebsite smallint,
computers_dojobefficiently smallint,
computers_comments varchar(8000),
benefit_sicktime smallint,
benefit_pto smallint,
benefit_insurance smallint,
benefit_comments varchar(8000),
coworkers_team smallint,
coworkers_rely smallint,
coworkers_supported smallint,
coworkers_assists smallint,
coworkers_conflictresolution smallint,
coworkers_comments varchar(8000),
supervisor_feedback smallint,
supervisor_respected smallint,
supervisor_supported smallint,
supervisor_understands smallint,
supervisor_information smallint,
supervisor_minormistakes smallint,
supervisor_comments varchar(8000),
administration_methods smallint,
administration_acknowledges smallint,
administration_acts smallint,
administration_confidence smallint,
administration_respected smallint,
administration_assistance smallint,
administration_comfortable smallint,
administration_comments varchar(8000),
environment_encouraged smallint,
environment_pay smallint,
environment_time smallint,
environment_work smallint,
environment_efforts smallint,
environment_respect smallint,
environment_appreciated smallint,
environment_comments varchar(8000),
participant_encouraged smallint,
participant_willing smallint,
participant_resources smallint,
participant_safety varchar(8000),
participant_care varchar(8000),
comments_well varchar(8000),
comments_improve varchar(8000),
survey_effective smallint
Re: What does this mean? Jim in Arizona
11/13/2006 10:55:51 AM
I didn't know that a single record (row) in a SQL2000 DB could not
exceed 8K of data. Yep, that does complicate things a bit.

I was thinking originally of doing a related table just for comments,
but rejected it in favor of a single table design. So much for simplicity.

I'll redesign the table structure.

Thanks again, Arnie.

Jim

[quoted text, click to view]
Re: What does this mean? Arnie Rowland
11/13/2006 11:11:16 AM
Unless you need Unicode, text would be 'better' than ntext.

And be aware that you 'may' have issues related to handling the text/ntext
fields in searches.

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf


[quoted text, click to view]

Re: What does this mean? Jim in Arizona
11/13/2006 11:44:32 AM
Yea, I was just wondering about that.

I was wondering how a single row (record) could only hold a total of
8060 bytes. What happens if you have an 'image' column? I know very few
photos out there that are less than 8060 bytes.

So, using ntext would suffice then?

[quoted text, click to view]
Re: What does this mean? Jim in Arizona
11/13/2006 11:51:11 AM
I changed my varchar(8000) columns to ntext and I got the same warning.


[quoted text, click to view]
Re: What does this mean? Jim in Arizona
11/13/2006 11:58:22 AM
Forget that post. I missed a column that was still varchar(8000). I
recreated the table with no errors.

Thanks Hilary.

Jim

[quoted text, click to view]
Re: What does this mean? Hilary Cotter
11/13/2006 1:28:37 PM
You might want to convert some of the columns to text which allow much more
data to be inputted.

--
Hilary Cotter

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Re: What does this mean? Hilary Cotter
11/13/2006 2:25:34 PM
Images are binary and should be stored in the image or varbinary(max)
datatype columns.

--
Hilary Cotter

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

AddThis Social Bookmark Button