Friday, March 30, 2012
nvarchar and output to flat file.
Im outputting a sql table to a text file. One of the columns in this table
is an nvarchar(1200) but the result in the flat file is truncated to 254
chars....how do ensure that it outputs all chars up to 1200?
thxJohn,
which approach / utility are you using to outputting the sql table to a text
file?
AMB
"John Smith" wrote:
> Hello,
> Im outputting a sql table to a text file. One of the columns in this table
> is an nvarchar(1200) but the result in the flat file is truncated to 254
> chars....how do ensure that it outputs all chars up to 1200?
> thx
>
>|||I think I gave him a suitable answer on a separate post.
Barrysql
Tuesday, March 20, 2012
Number of coloums in table
is there a size limit of a row?I think its a couple of thousand columns per table.|||
Yes, and yes. And the amounts depend on which version of SQL Server you are running.
2000 has a row size limit of 8060-ish (it's close to that if not exactly that), that doesn't include blob data (image/text). And there can only be 1024 columns per table.
The same applies for 2005, however, it gets a bit trickier to actually hit that limit since any variable length field (varchar/varbinary,nvarchar, etc) can be reduced to a 24-byte pointer node if that particular row is too large. So if a particular row's data would exceed 8060 bytes, it starts reducing the variable length fields to 24-byte nodes until the row will fit within the 8060 byte limit, and place the actual field data in out of row storage for you behind the scenes.