KeithRoberts
New member
- Local time
- Yesterday, 20:54
- Joined
- Jan 13, 2012
- Messages
- 3
I am using MS Access 2010 and created a function that dynamically creates an insert statement and adds data from many tables into one table. This is working.
However, I have noticed that in certain input tables, the member name is formatted as:
lastname\firstname
lastname\firstname\middle name(initial)
I need to create an update statement that will reformat this field to:
lastname, firstname
lastname, firstname middlename(initial)
Obviously, I cannot simply just update all occurrences of "\" to a comma or space. And not all records have this formatting issue.
I can use query in access to find all the records that have a "\" in the name field and that is about it.
I don't want to use the recordset as there can be about 28,000 records and it is very slow to process.
This is the insert statement that I use to bring all the records in from particular tables:
Any tips, ideas, or solutions would be greatly appreciated.
Thanks!!!
However, I have noticed that in certain input tables, the member name is formatted as:
lastname\firstname
lastname\firstname\middle name(initial)
I need to create an update statement that will reformat this field to:
lastname, firstname
lastname, firstname middlename(initial)
Obviously, I cannot simply just update all occurrences of "\" to a comma or space. And not all records have this formatting issue.
I can use query in access to find all the records that have a "\" in the name field and that is about it.
I don't want to use the recordset as there can be about 28,000 records and it is very slow to process.
This is the insert statement that I use to bring all the records in from particular tables:
Code:
sSql = "INSERT INTO DumpTable(" & _
"TABLENAME, COMPANYID, HPCODE, MEMBERID, MEMBERNAME, MEMBERDOB, " & _
"MEMBERCT, CAPDOLLARS, CAPDATE, PAIDDATE, ADDDATE) " & _
"SELECT " & _
"'" & sName & "', " & "COMPANYID, HPCODE, MEMBERID, MEMBERNAME, MEMBERDOB, " & _
"MEMBERCT, CAPDOLLARS, CAPDATE, PAIDDATE, " & "#" & Date & "# " & "FROM " & _
sName & ";"
Debug.Print sSql
Db.Execute sSql
Any tips, ideas, or solutions would be greatly appreciated.
Thanks!!!