Link to home
Start Free TrialLog in
Avatar of HelpdeskJBC
HelpdeskJBCFlag for Austria

asked on

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




ASKER CERTIFIED SOLUTION
Avatar of Srm74
Srm74

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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

Avatar of HelpdeskJBC

ASKER

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

thanks