AznDevil92
AznDevil92

Reputation: 554

Update with Substring

Hi is it possible to have a update SQL statement with a SELECT substring SQL statement?

How would I convert this to an update statement?

SELECT
    SUBSTRING([Col1], 2, LEN([Col1])-2)
FROM table1

Any help would be much appreciated.

Upvotes: 0

Views: 42

Answers (1)

briskovich
briskovich

Reputation: 690

 UPDATE table1 set Col1 = SUBSTRING([Col1], 2, LEN([Col1])-2)

Upvotes: 3

Related Questions