October 2, 2007 at 11:03 pm
When was that?? I never saw it work like I want it to ;)... like the old one.
October 2, 2007 at 11:45 pm
What exactly do you mean by Max Length of the row ?
October 3, 2007 at 2:30 am
Hey,
finally somebody coming back to the original topic of this post.
As you can find somewhere in the beginning of this post, I was searching for the record in a table with the max length in bytes. This means adding up the actual field length of each column.
My final script would then provide the defined max length of a record and the longest actual record for all tables. Because it goes through all records in all tables in can take quite long. If you need to check just one table, it shouldn't be too difficult to change the script.
[font="Verdana"]Markus Bohse[/font]
October 3, 2007 at 6:56 am
Ninja's_RGR'us (10/2/2007)
When was that?? I never saw it work like I want it to ;)... like the old one.
Actually, all that stuff worked... for about the first two days...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 3, 2007 at 6:58 am
Mahesh Gupta (10/2/2007)
What exactly do you mean by Max Length of the row ?
The maximum length of a row can be 8060 bytes. In this case, some of the folks are referring to "Max Length" as the total number of actual bytes used for each row.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 3, 2007 at 7:18 am
I think he mean TOTAL length for all 8 nvarchar columns.
SELECT TOP 1 WITH TIES PkCol, cl
FROM (
SELECT PkCol, DATALENGTH(Col1) + DATALENGTH(Col2) + DATALENGTH(Col3) + DATALENGTH(Col4) + DATALENGTH(Col5) + DATALENGTH(Col6) + DATALENGTH(Col7) + DATALENGTH(Col7) AS cl
FROM Table1
) ORDER BY cl DESC
N 56°04'39.16"
E 12°55'05.25"
Viewing 6 posts - 31 through 35 (of 35 total)
You must be logged in to reply to this topic. Login to reply