• Import from csv and add filename (2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Import from csv and add filename (2000)

    Author
    Topic
    #433190

    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?

    Viewing 0 reply threads
    Author
    Replies
    • #1018359

      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.

      • #1018365

        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

        • #1018366

          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.

          • #1018368

            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.

    Viewing 0 reply threads
    Reply To: Import from csv and add filename (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: