Re: Importing Text File that is vertically oriented
- From: Bob Quintal <rquintal@xxxxxxxxxxxx>
- Date: Sat, 31 Dec 2005 19:48:02 GMT
ghadley_00@xxxxxxxxx wrote in
news:1136042461.470019.234440@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
> Hi,
>
> I have a MS access database into which I need to import a text
> file that is oriented vertically (fields are listed from top
> to bottom with the value for each field appearing to the right
> of the field name (with a "|" as a delimiter)). The text file
> will only have 1 record's data. I would ideally like to setup
> a linked table to import this data - does anyone know of a way
> I can setup this import?
>
> Any help that can be provided would be greatly appreciated.
>
> Best wishes,
>
> George Hadley
> ghadley_00@xxxxxxxxx
>
Create a temporary table with two fields, one for the name and
the other for the value. Then you can create your properly
structured table using each of the datanames in the table, and
either write a crosstab query to pivot the data horizontally and
use that as the source for an append query or you can write some
visual basic code that manipulates the data and sets the value
in the final table.
so (off the top of my head, and needing support code)
rsDesti.addnew
do until rsSource.EOF
rsDesti.fields(rsSource!dataname) = rsSource!DataValue
loop
rsDesti.update
If you need help with any of this, post again.
--
Bob Quintal
PA is y I've altered my email address.
.
- References:
- Importing Text File that is vertically oriented
- From: ghadley_00
- Importing Text File that is vertically oriented
- Prev by Date: detail section in a report
- Next by Date: Re: DAO peculiarity in A97?
- Previous by thread: Re: Importing Text File that is vertically oriented
- Next by thread: Licensing versus Customization
- Index(es):
Relevant Pages
|