guu...@gmail.com wrote:
> On Saturday, October 27, 2012 11:19:18 AM UTC-7, Bob Barrows wrote:
> wrote: > On Saturday, October 27, 2012 10:45:59 AM UTC-7,
>
guu...@gmail.com > wrote: >> The table contains various data types
> (dates, integers, etc) How do >> I convert the first record only to
> 'camel caps' (first letter of the >> word to caps) and convert the
> first record to field names? Thanks. >> ggl > > By the way, in case
> you are wondering why I just don't do it manually > --we will be
> importing csv files frequently from an Oracle app every > day into
> Access. Use the import wizard ...
>
> This is after the data has already been imported.
Then you need to delete the imported data and start again. Run the import
wizard and tell it the first row contains field names. It won't be able to
affect their case, but really ... why do you care about the case of the
field names? If it's that important, create a view (a saved query) that
provides the column aliases as appropriate.
> The data being
> imported was in turn exported from Oracle. Apparently the csv files
> before the import have a hidden character which creates the imported
> file with the first record always a blank in the Access table. So
> the second record after the import are actually the field names. I
> simply delete the first (blank record) in Access.
>
> The problem now is how to turn the former 2nd record and now the
> first record to fieldnames.
>
> By the way, I don't want to mess around with the raw csv files. These
> files are about a terabyte in size and millions of records. I rather
> not use another program eg. grep, sed, text editor, etc to
> pre-process.
Well, that would be my preference. Since you don't want to do that, you will
need to write VBA code to accomplish what you want. If you need it done
quickly, I suggest hiring a consultant.
Wait, it just occurred to me that you already have data in a table in Access
... that table can be used as the source for a saved query that excludes the
first row and supplies column aliases for the field names.