Import/Update Query to correct names

TomKat

Registered User.
Local time
Yesterday, 23:57
Joined
Apr 24, 2008
Messages
61
Hello, I have a macro that dumps employee names into a temp table, then dumps them into the main Employee table. Yes, I could probably dump them straight into the main table. The temp table is used in another query as well.

My goal is to fix the names in the query by using the "CorrectName" module where the names are ProperCased before dumping them into the main table.

My question is how to put that in the query and where.

If I did a test query to see if the module fixes the name I have this:

CorrectName-Test: CorrectName([LastName]) and same for the first name.

I would also like to take the names in the employee table and fix them all to proper case. Right now, some are all CAPS, all lowercase and mixed.
How do I go about doing that without removing the PrimaryID keys and getting the names jumbled with the PID Key?


Any help would be appreciated.
 
Presuming you're using an append query to dump them into the main table, you can use your function there:

INSERT INTO (FieldName, ...)
SELECT CorrectName([LastName]), ...
FROM TempTable
 
I have an append and an update query. I would need to use it in both.

In the query itself, where does those go?

Field?
Table?
Append to?

INSERT INTO (FieldName, ...)
SELECT CorrectName([LastName]), ...
FROM TempTable

I have the following:
Fields: FirstName
Table: User Import table
Append To: FirstName

Sorry, I am kinda new to this area of building more specific functions into the query.
 
In design view, in either the Update To or Append To spots in the grid.
 

Users who are viewing this thread

Back
Top Bottom