Please see my other Database Development articles.
Updating a field with only a portion of its original value.
String functions provide powerful methods for manipulating values in recordsets.
Querying and changing only a portion of a field’s original data is a common requirement from the data layer.
In this example, I have a standard “pages” table that might contain items common to HTML pages.
For example, let’s say you have an “image” field to store the path to a page’s image, maybe it’s header graphic.
However, what if the image name contains underscores within every path being returned?
To avoid those characters from being returned, simply isolate the portion of each image path by using a combination of the string functions: substring(), charindex(), and len().