Create ODBC connection to the access file or work with OPENDATASOURCE()


Then in CF SELECT *
loop over each record, on each iteration you do an insert in the new db
columns you created, i.e. city, postalCode


INSERT INTO tblWhatever (city, postalCode)
VALUES ('#replaceNocase(string, "[0-9]", "", "all")#',
'#replaceNocase(string, "[^0-9]", "", "all")#')


I think, its untested.


Its really nasty though that you have to loop over each record within CF...


Taco Fleur
Blog  <http://www.tacofleur.com/index/blog/>
http://www.tacofleur.com/index/blog/
Methodology http://www.tacofleur.com/index/methodology/

Tell me and I will forget
Show me and I will remember
Teach me and I will learn

-----Original Message-----
From: Bob Haroche [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 17 February 2004 7:03 AM
To: CF-Talk
Subject: SOT: Splitting Access DB Columns

My client gave me a copy of their "database" which has a field for
city, containing both city and zip code, eg:

New York 10021
Santa Rosa 95404

Within the DB I need to split this column into two, one for city and
the other for zip.

How can I do this using Access 2002 and/or ColdFusion and regexp.

Thanks in advance.

-------------
Regards,
Bob Haroche
O n P o i n t  S o l u t i o n s
www.OnPointSolutions.com
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to