Import and convert to Uppercase

D

Doug Bell

Hi I need to import data from another Access DB an ensure that some fields
are uppercase.

Currently I run some SQL:

Set db = CurrentDb()
stSQL = "INSERT INTO tblUsrStckTrnsfrs (HHRecID, PalLbl, [GUID], " & _
"FromWhs, FromLoc, ToWhs, ToLoc, " & _
"TransType, lnDate, lnTime, " & _
"DeviceID, UserID, PCNam, Uploaded ) " & _
"SELECT [RecordID], PalletNo, dacGUID(), " & _
"FromWhs, FromLocation, ToWhs, ToLocation, " & _
"TransactionType, dacLnDate(TransDatTim),
dacLnTime(TransDatTim), " & _
"DeviceID, UserID, " & """" & dacPCNam() & """, False " & _
"FROM [" & stFolder & stDB & "].tblTransactions;"
db.Execute stSQL

I could build a function such as basCUcase and include it into the Select
statement but I wonder if there is simpler method as the function will be
called for each field of each record

Any ideas?

Doug
 
J

Joe Fallon

A few thoughts:
1. Access is case insensitive so what is the difference?

2. anything wrong with using the built-in VBA function to upper case the
data? Why write one?

3. Maybe it would be better if you selected the data into a staging table,
ran a series of upper case queries (or one big one) and the appended from
the staging table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top