Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 DTS and Help with Query

Author  Topic 

interclubs
Yak Posting Veteran

63 Posts

Posted - 2002-06-21 : 12:57:33
I am trying to use DTS to copy a table, but it won't copy over two of the fields in the table, I am assuming because my total row size exceeds the maximum number of bytes per row (8060)...The two fields are varchar(5000). 1. Is there a way to get around this in DTS? If not, can someone help me with the query to transfer over these fields from the QA.... The tables are exact, so I am assuming it would be something like:
Update DatabaseA.TBL_FAQ A set A.Question=(Select Question from DatabaseB.TBL_FAQ B where A.ID=B.ID)

Maybe?

Any help is Appreciated.

-Scott.

setbasedisthetruepath
Used SQL Salesman

992 Posts

Posted - 2002-06-21 : 14:58:34
quote:

I am trying to use DTS to copy a table, but it won't copy over two of the fields in the table, I am assuming because my total row size exceeds the maximum number of bytes per row (8060)



I would suspect this is not the case since if you are copying from SQL Server to SQL Server, the source table would also violate the maximum row width. What's the exact error message reported by DTS?

Jonathan Boott, MCDBA
Go to Top of Page

interclubs
Yak Posting Veteran

63 Posts

Posted - 2002-06-21 : 18:55:18
There is no error. It says it completed fine, but then when I go to open up the table the two fields all have null values. Everything else is copied fine.


Go to Top of Page

VyasKN
SQL Server MVP & SQLTeam MVY

313 Posts

Posted - 2002-06-22 : 04:42:00
Though you are allowed to create a table with two varchar(5000) columns, when it comes to storing data, you are not allowed to cross the row length limit, which is, 8060 bytes.

You may want to design your system such a way that both these columns appear in different rows. Or consider using text data type, for storing huge text values.

--
HTH,
Vyas
http://vyaskn.tripod.com
Go to Top of Page

interclubs
Yak Posting Veteran

63 Posts

Posted - 2002-06-22 : 20:39:56
What exactly is a row length limit..I am assuming it is the amount of data that can be stored in a single row? or the size of the fields of a row, and not the actual amount of data stored in a row?
Go to Top of Page

VyasKN
SQL Server MVP & SQLTeam MVY

313 Posts

Posted - 2002-06-23 : 06:16:53
total length of all columns can not exceed 8060 bytes.

--
HTH,
Vyas
http://vyaskn.tripod.com
Go to Top of Page
   

- Advertisement -