局部变量Ntext探针 [英] Local Variable Ntext Probelm

查看:113
本文介绍了局部变量Ntext探针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的数据库中有ntext列的
存储用,
分隔的uniqueidentifier值 所以我创建了在本地表中拆分此ntext值的函数,每行有1个uniqueidentifer值
但是当我尝试创建ntext类型的局部变量时出现错误

text,ntext和image数据类型对于局部变量无效
我需要任何帮助来解决我的问题

iam having ntext column in my database
that store uniqueidentifier value seprated with ,
so i create function to split this ntext value in local table which each row have 1 uniqueidentifer value
but i have error when i try to create local variable of type ntext

The text, ntext, and image data types are invalid for local variables
i need any help to solve my problem

推荐答案

您真的需要ntext吗?真的很痛苦...如果在该字段中4000个字符足以满足您的需求,那么我建议您改用nvarchar .

还有一点.您的帖子听起来像唯一标识符是某种自定义标识符,它实际上具有一定的意义.如果是来自数据的某种连接,我建议您使用真正的唯一标识符代替=>唯一但数据没有意义的键,唯一的目的是它是唯一的.有关更多信息,请参见: http://msdn.microsoft.com/en-us/library/ms187942.aspx [ ^ ]
Do you really need ntext? It can really be a pain... If 4000 characters is enough for you in the field, then I suggest that you use nvarchar instead.

Another point. Your post sounds like the unique identifier is some kind of custom identifier and it actually has a meaning. If it is some kind of concatenation from data, I''d suggest that you would use real unique identifiers instead => keys that are unique but the data doesn''t have a meaning, the only purpose is that it''s unique. For more info see: http://msdn.microsoft.com/en-us/library/ms187942.aspx[^]


这篇关于局部变量Ntext探针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆