| Author |
Topic |
|
cqldba303
Starting Member
16 Posts |
Posted - 2010-09-08 : 15:02:11
|
| I have one column(serial) in table(db1)the contents of this column are:DE328202668PT449263719SE354001059DE319501516I want to write a query which will add string(_072010) to all the contents of this column.so after I run the query the content of the column(serial) should look like this:DE328202668_072010PT449263719_072010SE354001059_072010DE319501516_072010Please let me know easy way to do this. I have 2000 rows in this column so query is easy.thanks |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
cqldba303
Starting Member
16 Posts |
Posted - 2010-09-08 : 15:14:06
|
| it gives me error:Server: Msg 8152, Level 16, State 9, Line 1The string or binary data would be warped.Statement has been terminated. |
 |
|
|
cqldba303
Starting Member
16 Posts |
Posted - 2010-09-08 : 15:15:20
|
| it sql 2000, something different should do ? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
cqldba303
Starting Member
16 Posts |
Posted - 2010-09-08 : 15:27:06
|
| You were write, it was size of the column.But I got another issue:Column Type is:varcharBy default size is 50My query works with that but it gives this resultDE328202668 _072010PT449263719 _072010SE354001059 _072010DE319501516 _072010How can i remove that GAP ? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
cqldba303
Starting Member
16 Posts |
Posted - 2010-09-08 : 15:30:23
|
| Problem is all the content of my column(serial), the size is not the same.Some content size is 10, somewhere 5 character and somewhere 20 character, it is not consistent size content of that column.but the string i want to attach (_072010) should be exactly the end of each content. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
cqldba303
Starting Member
16 Posts |
Posted - 2010-09-08 : 16:03:05
|
| COOLThanks for fixing. You seem like living by your name :) |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|