The problem was with the Access database. Google tells me that Access doesn't like the replace function. I have a stand-alone copy of Oracle on my laptop connected to ColdFusion. I tried it on an Oracle supplied table. It worked fine. Below, is a test which turns the dots (444.555.6666) in phone numbers to dashes (444-555-666)
"<cfquery name="getPhone" datasource="hr1"> SELECT replace(phone_number,'.','-') AS Phone FROM employees </cfquery>" Thanks much, Lewis On Wed, Jun 16, 2010 at 2:14 PM, Lewis Billingsley < [email protected]> wrote: > > Thanks for the help. I tried this, and it didn't work. Two possible > variables are that I am using a copy of ColdFusion on my laptop, connecting > to an Access database. Also, I'm running ColdFusion 7. Do you think any > of those things might make a difference. I'm able to do the query without > the replace function. > > What gets me is that ColdFusion is comlaining with: "Macromedia][SequeLink > JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Undefined > function 'replace' in expression." > > Any Thoughts? > > Thanks Jamie, > Lewis > > > On Wed, Jun 16, 2010 at 1:07 PM, Jamie Robichaud <[email protected]>wrote: > >> >> Try: >> >> Select replace('cust_state','a','') as custstate >> >> At least for me this format worked. >> >> >cfquery name="getStates" datasource="tysql" > >> >SELECT Replace(cust_state,"A","") AS custstate >> >FROM Customers >> >ORDER BY cust_state >> ></cfquery> >> >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5017 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm
