| Author |
Topic |
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2005-03-02 : 18:27:02
|
| Is this possible or how would you do this?UPDATE tblFeePaid SET NotesText = NotesText & 'other'Thanks!BrendaIf it weren't for you guys, where would I be? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-03-02 : 18:31:09
|
| UPDATE tblFeePaid SET NotesText = NotesText + ' other'Concatenation is done with + in T-SQL.Tara |
 |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2005-03-02 : 18:33:41
|
| Hi TaraI tried that before, but it gives me this error:Invalid operator for data type. Operator equals add, type equals text.BrendaIf it weren't for you guys, where would I be? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-03-02 : 18:36:10
|
| So you need to use UPDATETEXT for text data, right? Have you seen that UPDATETEXT article that SQLTeam has?Tara |
 |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2005-03-02 : 18:38:18
|
| I thought UPDATETEXT was only for over 8000 chars. I don't need that. Or do I need to use that for this?BrendaIf it weren't for you guys, where would I be? |
 |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2005-03-03 : 12:17:13
|
| I'm trying this, but it won't work. DECLARE @ptrval binary(16)DECLARE @length intSET @length = (SELECT Len(NotesText) FROM tblFeePaid WHERE Casenumber = '011-334719')SELECT @ptrval = TEXTPTR(NotesText) FROM tblFeePaidWHERE Casenumber = '011-334719'UPDATETEXT tblFeePaid.NotesText @ptrval length 1 'lowe' I know you can get the length of a text field, but how else would I do this? It gives me this error: "Argument data type text is invalid for argument 1 of len function." THanks for the help!BrendaIf it weren't for you guys, where would I be? |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2005-03-03 : 12:24:03
|
| Do you really need this to be a text column?and for text you use DATALENGTH()Brett8-) |
 |
|
|
brendalisalowe
Constraint Violating Yak Guru
269 Posts |
Posted - 2005-03-03 : 12:29:34
|
| I guess I can use varchar(8000). That would probably better huh? But how can I update the text?BrendaIf it weren't for you guys, where would I be? |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2005-03-03 : 14:51:57
|
| seehttp://www.mindsdoor.net/SQLTsql/InsertTextData.htmlfor appending text you don't need the lengthUPDATETEXT tblFeePaid.NotesText @ptrval null 0 'lowe'==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|