?
Solved

MS SQL 2005 - CONCATENATE Function?

Posted on 2007-04-05
2
Medium Priority
?
9,625 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 2000 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

764 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