本文介绍了如何在文本字段后附加字符串.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更新我的表字段(通过使用先前添加的值添加新值).字段的数据类型是文本.我尝试过的查询为

I want to update my table field(by adding new value with previously added value). data type of field is text. query which i tried is as

select notes= cast((convert(nvarchar(max),notes)+ ''  '' +convert(nvarchar(max),''shekhar is not here''))as text) from contact1 where accountno=''B10228491871N_\vlTes''



如果我在帐户的文本字段中使用注释数据的长度,则此查询成功运行=''B10228491871N_ \ vlTes''
例如.



This query runs successfully if I use the length of notes data in the text field for the accountNo =''B10228491871N_\vlTes''
eg.

select notes= cast((convert(nvarchar(10),notes)+ ''  '' +convert(nvarchar(max),''shekhar is not here''))as text) from contact1 where accountno=''B10228491871N_\vlTes''



我将转换中的第一个max替换为10(10是notes(text)字段中数据的长度.)

另外,如果我使用的长度超过10,则它不起作用(不添加文本)



这将返回先前的值.我应该如何添加具有原始值的新文本值.

此查询与其他数据库文本字段一起成功运行.
(我的数据库在还原时显示的是1.6兼容标签,因此将其更改为90.)



where I replace first max in convert with 10 ( 10 is the length of the data in notes(text) field.)

also if I use the length more then 10 it does not work ( do not add text )



this will return previous value. how should i add new text value with original value.

this query is running successfully with other db text fields.
( my db was showing 1.6 compatible label when i restored it so i change it as 90.)

推荐答案


这篇关于如何在文本字段后附加字符串.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 05:04