Advanced CSV File Import into Access

Поділитися
Вставка
  • Опубліковано 7 лют 2025
  • Explaining options for advanced CSV file import into Microsoft Access handling duplicate keys and updating existing records.
    The demo Access file used in the video is available for download: codekabinett.c...

КОМЕНТАРІ • 20

  • @scottaxton2513
    @scottaxton2513 6 років тому +1

    Thank you! Just what I was looking for. I get a file from a mail house that supplies address corrections if people have moved and I've been searching how to automate the update of the records rather than typing in one at a time. This helps very much!
    Liked and subscribed, Look forward to additional videos.

  • @jaironaranjo3654
    @jaironaranjo3654 3 місяці тому +1

    Thank you so much for such agreat video great job

  • @njmusama
    @njmusama 9 місяців тому +1

    Thank you for this great lecture, I hope you explain how to append the same file into an access table or append the file directly from the search box to an access table, in order not to increase the database size by duplicating data.

    • @codekabinettcomen
      @codekabinettcomen  9 місяців тому

      That's a good point. - I'm thinking about a follow up video, where I will cover this.

  • @davegoodo3603
    @davegoodo3603 7 років тому +1

    Great video Phillip! Interesting approach, lots to learn and use. Thanks.

  • @virterra
    @virterra 2 роки тому

    Really good video. Thank you for taking the time to make it!

  • @paoloalbanese7902
    @paoloalbanese7902 20 днів тому

    Hi, why did you not save the changes to the table at 18:57?

  • @peterfrigge5803
    @peterfrigge5803 2 роки тому

    This video showed clearly how to import csv-files into access. very good! I have a question: don't you follow the Microsoft rules when naming variables? For example: strName for strings, lngId for long integer, intVarName for integer an so on. It is very helpful when reading a foreign programcode for I can identify the types of the variables by their names.

  • @smiljanicn
    @smiljanicn 3 роки тому +1

    Great video! How to handle issue when your data does not start after first line? Also what if you dont have Field names in CSV?

    • @codekabinettcomen
      @codekabinettcomen  3 роки тому +1

      If you run the Import Text Wizard, there is a setting "First Row Contains Field Names". If you open the hidden system table "MSysIMEXSpecs", which stores the configuration of the import specs, there is a "StartRow" column. For reasons unknown, this is not shown in the Wizard UI, but AFAIK it still works if you edit it in the table.

  • @bokkakesballa
    @bokkakesballa 2 роки тому +1

    Can I import also xls to access trought a batch script?thanks

    • @codekabinettcomen
      @codekabinettcomen  2 роки тому

      Yes, you can by using DoCmd.TransferSpreadsheet. However, import specifications are not supported, which makes the process simpler but also less flexible.

  • @rabeezley
    @rabeezley 6 років тому +1

    Thank you for the great videos. How would you handle an import into a related table that had a foreign key to the primary key of the another table? For example you import in a list of customers who may or may not already exist and then you need to import in orders for those customers and relate them to the customers primary key.

    • @codekabinettcomen
      @codekabinettcomen  6 років тому

      Good question. Your files will probably have an external customer id linking customers and orders. You can use this id to link the orders to the right customer (and their PK) in your database and insert it into the FK of the orders table.
      The real problem are the potential customer duplicates. From experience I know there is no technical solution to solve 100% of this. You need to provide and user interface to the user to manually link/eliminate duplicates on those cases that cannot be solved technically.

  • @AMARHADI
    @AMARHADI 4 роки тому +1

    What if I have tabel that dont have primary key like sales or transaction data which can be repeated, and i want update based on monthly transaction but want just update it if it already imported before. thank you for your video, it help me so much.

    • @codekabinettcomen
      @codekabinettcomen  4 роки тому

      No primary key is not ideal in any table.
      You can compare multiple fields if required. If all fields in multiple records are identical, I would aggregate the data until the duplicates are removed. There's no value in keeping individual records then. That applies to the data in the database as well as in the import.

  • @dalygeek
    @dalygeek 3 роки тому

    Can you share the ACCESS file with us please? Thanks in advance

  • @pelegst
    @pelegst 7 років тому +1

    Why not just link to the CSV instead of actually importing it into a temporary file? This way, you don't have to worry about deleting it and compacting your database. There may be a performance hit, but I don't think, as a practical matter, it will be anything to worry about.

    • @codekabinettcomen
      @codekabinettcomen  7 років тому

      Paul, very good point! This was actually in my first draft of the script for this video. I changed it because it will work only for the append query but not for the update query. - I will explain in more detail in another video.