Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Append something to every value in a column?

Author  Topic 

label
Posting Yak Master

197 Posts

Posted - 2003-09-02 : 15:20:05
I want to append a value to every value in my table without having to use a cursor.

So for instance, if my Table was

Age
-----
30
32
34
31
29
34

and I wanted to place an "x" after every value in the age column, how would I do that?

Thanks!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-09-02 : 15:23:40
Assuming that Age column is not an INT column:

UPDATE Table1
SET Age = Age + 'x'

Tara
Go to Top of Page

label
Posting Yak Master

197 Posts

Posted - 2003-09-02 : 16:24:27
quote:
Originally posted by tduggan

Assuming that Age column is not an INT column:

UPDATE Table1
SET Age = Age + 'x'

Tara



Thanks, I think that's working but I've got a bigger issue now which I'll open a different thread to discuss.
Go to Top of Page
   

- Advertisement -