| Author |
Topic  |
|
|
cqldba303
Starting Member
16 Posts |
Posted - 09/08/2010 : 15:02:11
|
I have one column(serial) in table(db1) the contents of this column are: DE328202668 PT449263719 SE354001059 DE319501516
I 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_072010 PT449263719_072010 SE354001059_072010 DE319501516_072010
Please let me know easy way to do this. I have 2000 rows in this column so query is easy. thanks |
|
|
tkizer
Almighty SQL Goddess
USA
35007 Posts |
|
|
cqldba303
Starting Member
16 Posts |
Posted - 09/08/2010 : 15:14:06
|
it gives me error:
Server: Msg 8152, Level 16, State 9, Line 1 The string or binary data would be warped. Statement has been terminated. |
 |
|
|
cqldba303
Starting Member
16 Posts |
Posted - 09/08/2010 : 15:15:20
|
| it sql 2000, something different should do ? |
 |
|
|
tkizer
Almighty SQL Goddess
USA
35007 Posts |
|
|
cqldba303
Starting Member
16 Posts |
Posted - 09/08/2010 : 15:27:06
|
You were write, it was size of the column. But I got another issue: Column Type is:varchar By default size is 50 My query works with that but it gives this result DE328202668 _072010 PT449263719 _072010 SE354001059 _072010 DE319501516 _072010 How can i remove that GAP ? |
 |
|
|
tkizer
Almighty SQL Goddess
USA
35007 Posts |
|
|
cqldba303
Starting Member
16 Posts |
Posted - 09/08/2010 : 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
USA
35007 Posts |
|
|
cqldba303
Starting Member
16 Posts |
Posted - 09/08/2010 : 16:03:05
|
COOL Thanks for fixing. You seem like living by your name :) |
 |
|
|
tkizer
Almighty SQL Goddess
USA
35007 Posts |
|
| |
Topic  |
|