Sep 7, 2006 #1 shelley6 Technical User Sep 7, 2006 1 CA I need to replace only the first character of a string using SQL Query. For instance: Is: 3000378920 (or anything starting with a 3) Should be: 2000378920 I'd appreciate any suggestions
I need to replace only the first character of a string using SQL Query. For instance: Is: 3000378920 (or anything starting with a 3) Should be: 2000378920 I'd appreciate any suggestions
Sep 7, 2006 1 #2 PHV MIS Nov 8, 2002 53,708 FR UPDATE yourTable SET yourString='2' & Mid([yourString], 2) WHERE yourString Like '3*' Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
UPDATE yourTable SET yourString='2' & Mid([yourString], 2) WHERE yourString Like '3*' Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Sep 7, 2006 1 #3 rjoubert Programmer Oct 2, 2003 1,843 US UPDATE YourTable SET YourTable.YourField = "2" & Mid([YourField], 2, Len([YourField])) WHERE (((Left([YourField], "1")) = 3)); Upvote 0 Downvote
UPDATE YourTable SET YourTable.YourField = "2" & Mid([YourField], 2, Len([YourField])) WHERE (((Left([YourField], "1")) = 3));