|
| |
|
|
monstertrap
Posts: 153 Joined: 5/1/2002 From: Rocky Mount, North Carolina, USA Status: offline
|
Access Database Scripting Help - 3/10/2005 17:00:22
I have an access database that contains a table called "Bills" in that table there is a field named "Last_Name". The information is exported from an old mainframe to a flat file, then opened in notepad and saved as text file. When the access database is opened the data is automatically imported. Some of the records have a comma after the last name. Does anyone know how to write a script or module that could be set to run automatically to delete the commas? I usually do this manually with the find/replace feature. Database contains about 45,000 records.
_____________________________
Thanks John K.
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Access Database Scripting Help - 3/11/2005 10:51:28
I'm not sure of all the SQL and stuff you're using but the basic function I would use is something like this: REPLACE(myTextString,",","") This command is basically telling VBScript that whatever text I assign to myTextString to replace all commas (",") with an empty string (""). So for instance, the SQL might look something like: mySQL = "INSERT INTO Bills (Last_Name,Amount) VALUES (' & REPLACE(Request("Last_Name"),",","") & "'," & Request("Amount") & ")" Of course, this scenario involves posted data but the theory remains the same. That any help?
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|