I finally acheived what I needed to but not by taking Dan's
advice.
Thanks Dan for your advice, but what is one to do if they are
in a situation where they are working with a vendors' database and
do not have the luxury to normalize their database? ( which is
where I have found myself)
Here is an example of the field i'm trying to update:
LAYOUT=BOTTOM|70|30,TOP=,LEFT=
13|4|2|3|22,RIGHT=14|1|10]
(My goal is to insert a |23 between the 13|4)
Solution:
<cfquery name="Rs" datasource="FusionDox">
SELECT *
FROM dbo.FDOX_USERINFO
</cfquery>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Plug-Ins Update</title>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body>
<cfoutput query="Rs">
<!--- finds the postion in the string--->
<cfset variables.pos = FIND("LEFT=13|",
rs.PluginSelections, 1)> <!---the 1 is the starting
position--->
<!---once you found it load left side into myvar1 and
will count 7 characters past the first position--->
<cfset variables.myvar1 =#MID(rs.PluginSelections, 1,
variables.pos + 7)#>
<!---once you found it load right side into myvar1 and
will count 7 characters past the first position--->
<cfset variables.myvar2 = #MID(rs.pluginselections,
variables.pos + 8, LEN(rs.pluginselections) - variables.pos)#>
<!---once you have the left and the right counted apart
then you just plug in the myvar3 variable--->
<cfset variables.myvar3 = variables.myvar1 & "23|"
& variables.myvar2 >
#rs.pluginselections# | #variables.pos#
<br />
1: #variables.myvar1# <br />
2: #variables.myvar2# <br />
<b>3: #variables.myvar3#</b>
<br />
<cfset variables.myvar4 = Replace(rs.pluginselections,
"|||", "|", "ALL")>
<span
class="style1"><strong>4: #myvar4#<br />
</strong>
<br />
</span>
<!---ONLY RUN THIS ONCE OR THE UPDATE WILL RUN THE UPDATE
AGAIN--->
<!---<cfquery name="Rs2" datasource="FusionDox">
UPDATE FDOX_UserInfo
set FDOX_UserInfo.PluginSelections = '#myvar3#'
WHERE FDOX_UserInfo.userid = #rs.userid#
</cfquery>--->
</cfoutput>
</body>
</html>