Solved

MS SQL 2005 - CONCATENATE Function?

Posted on 2007-04-05
2
9,614 Views
Last Modified: 2012-08-13
I am trying to find a way to add some numbers to a column of data in MS SQL 2005. I am not sure if this is possible in MS SQL, but below is what I am trying to do -

UPDATE Table
SET column_name=CONCATENATE('00',column_name);

Any suggestions on how to do this are greatly appreciated.

Thank you
Kristofer
0
Comment
Question by:conquerdev
2 Comments
 
LVL 11

Accepted Solution

by:
dready earned 500 total points
ID: 18861515
Is the column of type varchar() or char or text?
If so, it can be done this way:

update table set column_name = '00' + columnname

0
 

Author Comment

by:conquerdev
ID: 18861721
dready,

Worked Perfectly!

Thank you,
Kristofer
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sql 2014,  lock limit 5 32
Query Syntax 17 36
Deal with apostrophe in stored procedures 8 42
MySQL Backup Strategy 15 24
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question