How do I pass a string parameter greater than varchar(8000) in SQL Server 2000?

寵の児 提交于 2019-12-13 14:28:41

问题


You get a compilation error if you define the string parameter to have a size greater than 8000

e.g.

The size (9000) given to the type 'varchar' exceeds the maximum allowed for any data type (8000).

Any ideas?


回答1:


you need to store it as TEXT instead of varchar for string larger than 8000 in sql 2000




回答2:


You can't use text as a parameter value for a stored proc in SQL 2000<< Sure you can.

What you cannot do is define a local variable as text




回答3:


You can't do that in SQL 2000, use the "text" data type instead.

Choose SQL 2000 Data Types




回答4:


You can't use text as a parameter value for a stored proc in SQL 2000, so usually the technique is to break up the information into chunks of 8000 characters or less and reassemble in the proc.



来源:https://stackoverflow.com/questions/284610/how-do-i-pass-a-string-parameter-greater-than-varchar8000-in-sql-server-2000

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!