Solved

MS SQL 2005 - CONCATENATE Function?

Posted on 2007-04-05
2
9,624 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

688 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