Solved

MS SQL 2005 - CONCATENATE Function?

Posted on 2007-04-05
2
9,608 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
Comment Utility
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
Comment Utility
dready,

Worked Perfectly!

Thank you,
Kristofer
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now