[thelist] SQL Server Help

Chris Blessing webguy at mail.rit.edu
Thu Jun 6 09:18:01 CDT 2002


Josh-

In enterprise manager, if you right-click on the field Column_1_3 you can go
under the Indexes/Keys tab and click the "Create UNIQUE" checkbox, and
select constraint.  I believe the reason this is necessary is that you have
two fields creating one primary key in the other table (Table2) but just
from looking at it I honestly can't tell you myself.  I'm no rudy that's for
sure. :)

Regarding the 2nd error, do you have any really big varchar fields in
Table1?  If so, try converting them to text fields to see if that helps with
the problem.

HTH!

Chris Blessing
webguy at mail.rit.edu
http://www.330i.net

> [ Picked text/plain from multipart/alternative ]
> I am creating a database that has a bunch of tables that are
> related to each
> other.  I have been thrown two errors which I would appreciated help with.
>
> 1) When I try to create a relationship between two tables like so:
>
> Table1
> 	Column_1_1  Primary Key
> 	Column_1_2
> 	Column_1_3  Foreign Key  = Column_2_1
>
> Table2
> 	Column_2_1  Primary Key
> 	Column_2_2  Primary Key
>
> I get the following error:
>
> "The columns in table 'Table1' do not match an existing primary key or
> UNIQUE constraint."
>
> 2) When I am try to create a relationship between a number of tables, and
> SAVE the relationship I get the following error:
>
> "The total row size (8374) for table 'Table1' exceeds the maximum
> number of
> bytes per row (8060). Rows that exceed the maximum number of
> bytes will not
> be added."
>
> I looked around and found that this second error is a limit that
> one row can
> have column values that exceed 8060 bytes.  Table1 doesn't have anywhere
> near the upper limit, so I am left to guess that the relationship makes it
> that the two tables are viewed as one.  Is this correct, and if
> so, how else
> can I achieve normalization?
>
> Thanks for your help.
>
> Josh




More information about the thelist mailing list