Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to update an existing table with a new uniqueidentifier column?

Status
Not open for further replies.

xavstone

Technical User
Apr 12, 2005
33
GB
Hi All,

I have added a uniqueidentifier column to an existing table in Microsoft SQL Server.

All I want to do is populate the existing records with new Guids. I have tried things based on this to no avail:

Code:
@GUID uniqueidentifier

AS

UPDATE sysx_groups SET GUID=@GUID

	RETURN

Any help much appreciated.

Ben
 
Code:
UPDATE sysx_groups SET GUID=NewId()

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
ah! *Slaps forehead*

Thank you very much :)

Ben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top