Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Update contents of 2 string fields into one.
Tue, Aug 18 2009 1:40 AMPermanent Link

"John Postnikoff"
How can I update the string contents of two fields in a database into one
field  e.g. FieldA + FieldB into FieldA   without creating a new field using
SQL.

John P

Tue, Aug 18 2009 3:55 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John


If FieldA is big enough then simply

UPDATE table SET FieldA = FieldA + FieldB;
ALTER TABLE table DROP COLUMN FieldB;

If FieldA isn't big enough then you'll need to start the script with

ALTER TABLE table REDEFINE COLUMN FieldA VARCHAR(biggernumber);

purely from memory so test first


Roy Lambert [Team Elevate]
Image