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] "Jim in Arizona" <tiltowait@hotmail.com> wrote in message = news:O2f7Y5zBHHA.3228@TK2MSFTNGP03.phx.gbl... >I got this warning: >=20 > Warning: The table 'survey06' has been created but its maximum row = size=20 > (96219) exceeds the maximum number of bytes per row (8060). INSERT or=20 > UPDATE of a row in this table will fail if the resulting row length=20 > exceeds 8060 bytes. >=20 >=20 > I'm not sure what this means to me. I've got about 200 employees that=20 > 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? >=20 > What does this warning mean by exceeding a row length of 8060 bytes? = Is=20 > it because I'm using varchar(8000) multiple times? >=20 > Here's the table I made: >=20 > 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
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
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] Arnie Rowland wrote: > 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. > > -- > 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 > > > "Jim in Arizona" <tiltowait@hotmail.com <mailto:tiltowait@hotmail.com>> > wrote in message news:O2f7Y5zBHHA.3228@TK2MSFTNGP03.phx.gbl... > >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
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] "Jim in Arizona" <tiltowait@hotmail.com> wrote in message news:OZdv7N1BHHA.5064@TK2MSFTNGP02.phx.gbl... > 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? > > Hilary Cotter wrote: >> You might want to convert some of the columns to text which allow much >> more data to be inputted. >>
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] Hilary Cotter wrote: > You might want to convert some of the columns to text which allow much more > data to be inputted.
I changed my varchar(8000) columns to ntext and I got the same warning. [quoted text, click to view] Hilary Cotter wrote: > You might want to convert some of the columns to text which allow much more > data to be inputted.
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] Jim in Arizona wrote: > I changed my varchar(8000) columns to ntext and I got the same warning. > > > Hilary Cotter wrote: >> You might want to convert some of the columns to text which allow much >> more data to be inputted.
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] "Jim in Arizona" <tiltowait@hotmail.com> wrote in message news:Ohxgty0BHHA.3924@TK2MSFTNGP02.phx.gbl... >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 > > Arnie Rowland wrote: >> 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. >> >> -- >> 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 >> "Jim in Arizona" <tiltowait@hotmail.com <mailto:tiltowait@hotmail.com>> >> wrote in message news:O2f7Y5zBHHA.3228@TK2MSFTNGP03.phx.gbl... >> >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 >> > )
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] "Jim in Arizona" <tiltowait@hotmail.com> wrote in message news:OZdv7N1BHHA.5064@TK2MSFTNGP02.phx.gbl... > 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? > > Hilary Cotter wrote: >> You might want to convert some of the columns to text which allow much >> more data to be inputted. >>
Don't see what you're looking for? Try a search.
|