Re: Importing Text File that is vertically oriented



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.
.



Relevant Pages

  • Re: Newbie question here
    ... Ralph wrote: ... figure out how to call a function that is setup as a button (without ... Yeap, ... processes regarding standard Visual Basic code. ...
    (microsoft.public.vb.general.discussion)
  • crosstab questions
    ... Ok...I have setup a crosstab query. ... wizard. ... A report's controls need to be bound to fields. ...
    (microsoft.public.access.queries)
  • Crosstab Query
    ... I have a Crosstab query that does everything I need, ... correctly ie no page setup. ... Is there an easy way to report a crosstab query? ... Prev by Date: ...
    (microsoft.public.access.queries)
  • Re: INSERT INTO HELP
    ... I need to Insert these rows into another table with this setup: ... A crosstab query will create the one row from the 3, ... usenet at dfenton dot com http://www.dfenton.com/DFA/ ...
    (microsoft.public.access.queries)