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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 problem adding suffix character
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

susanto1975
Starting Member

1 Posts

Posted - 01/21/2013 :  20:09:45  Show Profile  Reply with Quote
Hi All, i need to your help..
it's my table (t_master)

number Type
1 ZTRW34
2 STRW1
3 STFVRH5

I would need to see the following: (Adding suffix "_OK")
number Type
1 ZTRW34_OK
2 STRW1_OK
3 STFVRH5_OK

i believe somebody can help me...
best thanks..

jimf
Flowing Fount of Yak Knowledge

USA
2875 Posts

Posted - 01/21/2013 :  20:22:33  Show Profile  Reply with Quote
SELECT number,[type],[TYPE] + '_OK' as NewType
FROM t_master

or if you actually want to change the values in t_master

UPDATE t_master
SET [TYPE] = [TYPE] + '_OK'

Jim

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000