Update statement - using substring
Posted on 2007-04-07
I have an update statement that currently looks like this...
SET data = (SELECT tblEx.[4KD]
FROM tblEx INNER JOIN
tblDa ON tblEx.ID = SUBSTRING(tblDa.Data, 1, 3))
The question I have is that my data column looks like this - 101000ABC and I don't want to set the entire column equal to the new value. I only want to update a part of it using substring, but I dont know the syntax of how to do that here. I have tried SET SUBSTRING(data,4,3) = .... but that did not work.