Results 1 to 9 of 9
  1. #1
    4 Star Lounger
    Join Date
    Jul 2006
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Field in text file not importing correctly (2003)

    Hello,

    I am having problems trying to import a field row from a csv file it is "atv01001" and then show this in a report in Access.
    It works on its own and imports fine but not when placed in a file with other rows.
    The file format is a text file and looks like this:

    "atv.atv01001"
    "caa.atv01002"
    "caa.atv01003"

    I am only interested in importing the information after the fullstop in the file. i.e atvxxxx

    Attached is a file l am using and also a screenshot of the technique l am using to import the file.i.e the fixed width details.
    I don't get any error messages, this field does not simply import when placed in a file with other field rows.
    I have to use fixed width as the fields are seperaetd by a full stop and l don't know any other way of importing the file.

    When l do produce a report from the imported text file with the row "atv.atv01001" and other field rows the row "atv.atv01001" is simply not imported. I am baffled as to why this is. It works fine on a file on its own i.e. with no other data in the imported file so l am confused to say the least.

    Any help would be appreciated.

    Justin

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Field in text file not importing correctly (2003)

    Why don't you import the file into a 1 column table, then use a create table from the imported table.

  3. #3
    4 Star Lounger
    Join Date
    Jul 2006
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field in text file not importing correctly (20

    Hi,

    I don't know what you mean by use a create table, could you possibly show me a screenshot as to what you mean.

    That would be appreciated.

    Justin

  4. #4
    4 Star Lounger
    Join Date
    Jul 2006
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field in text file not importing correctly (20

    If l use a one column table how do l include just the data after the full stop in each row in the file, can you explain if possible include a screenshot.

    Thanks
    Justin

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Field in text file not importing correctly (20

    Don't worry about the Make table query, simply import the data into your desired table without using Import Specs.

    Then use a query as the source of your report such as:

    SELECT Mid(Fieldname,5) as WhatEver FROM TableName

    Substitute the table name and field name above with your table and field names.

  6. #6
    4 Star Lounger
    Join Date
    Jul 2006
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field in text file not importing correctly (20

    So if l wanted to select all the data after the fullstop would the following query work:

    select mid(id,5) as whatever from userid

    id = field
    userid = table

    If l import the details as a normal text file then run the query,should that work?
    Is "whatever" a valid access synatax name? As l have not come across this before?

    Justin

  7. #7
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Field in text file not importing correctly (20

    Your example there is correct.

    The word Whatever is an alias, this would be used in the report program.

  8. #8
    4 Star Lounger
    Join Date
    Jul 2006
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field in text file not importing correctly (20

    Hello,

    thanks for that, l don't think l explained myself clealty enough, l have therefore re-posted the problem, as it is a bit more complex.

    new thread:

    http://www.wopr.com/cgi-bin/w3t/showflat.p...sb=5&o=0&fpart=

    Would you be able to include a zip file or attachment of some sample data and a query if you able to assist , this would be greatly appreciated.

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Field in text file not importing correctly (20

    Thread locked since question has been reposted. Please post all replies in the thread starting at <post#=591726>post 591726</post#>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •