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
 General SQL Server Forums
 New to SQL Server Programming
 Update Statement

Author  Topic 

junior6202
Starting Member

45 Posts

Posted - 2015-01-07 : 13:33:19
I have a question, what kind of Query or function do I have to use to UPDATE multiple record that I just want to add a letter at the end of the existing OrderNum. Thanks in advance,see example below.

Before
ID NAME OrderNum
1 Pete WEB123
2 Paul WEB124
3 Sam WEB125
4 Tim WEB126

After

ID NAME OrderNum
1 Pete WEB123A
2 Paul WEB124A
3 Sam WEB125A
4 Tim WEB126A

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2015-01-07 : 13:39:41
update yourtable set OrderNum = OrderNum + 'A'

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

junior6202
Starting Member

45 Posts

Posted - 2015-01-07 : 13:46:51
Thank you so much Tara.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2015-01-07 : 14:11:02


Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -