Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Warwick, Warwickshire, England
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Import from csv and add filename (2000)

    I am importing data from a csv file and would like to add an extra field to the record as it is imported containing the file name. Is this possible?

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

    Re: Import from csv and add filename (2000)

    Not during a direct import. You could link the .csv file, then run a make-table query that creates a table and adds the filename field.

  3. #3
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Warwick, Warwickshire, England
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Import from csv and add filename (2000)

    The name of the csv file will change between each import, so don't think linking would be an appropriate method of data collection in this case, or am I missing something

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

    Re: Import from csv and add filename (2000)

    You could write code to
    - Let the user select the .csv file
    - Link the .csv file.
    - Run a make-table or append query (assemble the SQL in code)
    - Delete the link.

  5. #5
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Warwick, Warwickshire, England
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Import from csv and add filename (2000)

    Need to complete this with no user intervention. csv files are supplied by another system with the filename in format ddmmyyyyhhmmss.cvs
    I would want to just run routine for filenames starting with todays date.

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

    Re: Import from csv and add filename (2000)

    OK, then scrap the user prompt.

Posting Permissions

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