当前位置: 代码迷 >> Sql Server >> 字符截取有关问题
  详细解决方案

字符截取有关问题

热度:91   发布时间:2016-04-27 16:40:50.0
字符截取问题
declare   @g   varchar(8000)
declare   @str   varchar(8000),@str1   varchar(8000),@str2   varchar(8000),@str3   varchar(8000)
while   (@i <10)
begin
if(datalength(@[email protected]) <8000)
set   @[email protected][email protected]
else
set   @[email protected][email protected]
.....
end
[email protected]@str变量中,@g的内容是变的..

------解决方案--------------------
如果不能用text类型变量,
[email protected],其它变量也不能大于8000,大于8000了也存不到不为text的字段上
  相关解决方案