• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 301
  • Last Modified:

TSQL Script summarize data in new column


I need to summarize the first, last name and the email adress to one column in the sql database
we use Microsoft SQL Server 2008 standard

i want to create a stored procedure that is able to fill the data into the new emty column
so i need to summarize the informations (first + last + mail) in the column for each row




0
HelpdeskJBC
Asked:
HelpdeskJBC
1 Solution
 
Srm74Commented:
If I understand you right..


UPDATE TableX  SET SummarizedName = first + ' ' + last + ' ' + mail

Open in new window


Where SummarizedName , first, last, mail are columns in TableX..

Hope it helps
0
 
EyalCommented:
CREATE PROCEDURE AlterEmptyField
	@RowID int
AS
BEGIN
	SET NOCOUNT ON;
	update tablename set emptyfield = first + last + mail where ID = @RowID
END
GO

Open in new window

0
 
HelpdeskJBCAuthor Commented:
i tought that i need a do while >eof loop, but this is easy
works fine!

thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now