因为nvarchar长度不够用,所以要把nvarchar换成varchar 
但是现在有个问题就是 下面有输出值的地方,要用到
exec sp_executesql @strTmp,N'@Counts int out ',@Counts out
现在把strTmp换成varchar后报错!
过程需要类型为 'ntext/nchar/nvarchar' 的参数 '@statement'。 
求高手解答!

解决方案 »

  1.   

    sp_executesql 必须使用nchar/nvarchar
      

  2.   

    SQL2K的?
    要不行你换两个NVARCHAR加一起试试看吧。或者写成EXECUTE 的执行方式。不用SP的。SP必须NVARCHAR。
      

  3.   

    楼上几位高手,nvarchar(max)=nvarchar(4000)不?
      

  4.   

    当然不等了max 长度可以达到2g
      

  5.   

    Variable-length Unicode string data. n defines the string length and can be a value from 1 through 4,000. max indicates that the maximum storage size is 2^31-1 bytes (2 GB). The storage size, in bytes, is two times the actual length of data entered + 2 bytes. http://msdn.microsoft.com/en-us/library/ms186939.aspx
      

  6.   

    哈哈,改成nvarchar(max)就可以了,谢谢诸位!