There's quite a few things here a bit off. > <CFQUERY NAME="GetData" datasource="1234" maxrows="10000"> > Select ID,XYSHORTDESC > FROM xyarticles > </CFQUERY> > <cfloop query="GetData" startrow="1" endrow="#GetData.recordcount#"> > <cfsavecontent variable="str"> > <cfoutput>#GetData.XYSHORTDESC#</cfoutput> > </cfsavecontent>
Why do you copy the value from the query into a new variable? You don't need to. > <cfset textstr = REReplace(str,'<[^>]*>','','all')> That line there could be: <cfset textstr = REReplace(getDats.xyshortdesc,'<[^>]*>','','all')> Also, you can change the regex a bit: <.*?> > <CFSET textstr = LEFT(textstr,255)> > <cfoutput> > #textstr# > </cfoutput> Ok, so at this point, is textstr ok? What do you see? The issues I mentioned above shouldn't actually make things not work. > <CFQUERY NAME="UpdateData" datasource="1234" password="12345" > username="frank"> > update xyarticles set XYSHORTDESC = '#textstr#' > where ID = '#GetData.ID#' > </CFQUERY> And again - you want to use cfqueryparam - but that shouldn't break stuff ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349866 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

