The LIKE statement did the trick.  I forgot that one.
Thanks for your help.

  _____  

From: Ewok [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 02, 2004 2:22 PM
To: CF-Talk
Subject: RE: Looping Question

This looks like it should work..

It is looping the query versus from and to

I changed your query to only pick records that have dashes in them as well.

<!--- Get a count of the records prior to insertion --->

<cfquery name="getRecords"  datasource="#REQUEST.dsnSQL#"

username="#REQUEST.dsnUID#" password="#REQUEST.dsnPWD#">

SELECT memberID, directoryPhone   

FROM #REQUEST.prefix#_Members_ListBU1

WHERE DIRECTORYPHONE LIKE '%-%'

</cfquery>

Query Recordcount = <cfoutput>#getRecords.recordcount#</cfoutput><br />

Processing ...

<cfloop query="GetReocrds">

<cfquery name="updateRecords" datasource="#REQUEST.dsnSQL#"
username="#REQUEST.dsnUID#" password="#REQUEST.dsnPWD#">

UPDATE #REQUEST.prefix#_Members_LIstBU1

SET directoryPhone = #Replace(getRecords.directoryPhone, "-", "",

"ALL")#

WHERE memberID = #memberID#

</cfquery>

</cfloop>

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.745 / Virus Database: 497 - Release Date: 8/27/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.745 / Virus Database: 497 - Release Date: 8/27/2004
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to