I have a SQL Table I am trying to update...I would like to add '-000' to the end of every value in a column, GLSegment.
I can do this for one row using this statement...
UPDATE CmpnyGLSegments
SET GLSegment = (SELECT SUBSTRING (GLSegment, 1, 3) FROM CmpnyGLSegments WHERE RowID = 2)+'-000'
WHERE RowID = 2
but do not know how to do this for every row at once. I would like to take each existing GLSegment value for each row, and add '-000'.
Thanks for any help you can provide.
I can do this for one row using this statement...
UPDATE CmpnyGLSegments
SET GLSegment = (SELECT SUBSTRING (GLSegment, 1, 3) FROM CmpnyGLSegments WHERE RowID = 2)+'-000'
WHERE RowID = 2
but do not know how to do this for every row at once. I would like to take each existing GLSegment value for each row, and add '-000'.
Thanks for any help you can provide.
Comment