Forum Discussion

AndreaF's avatar
AndreaF
Contributor III
8 months ago

LoadCustomTableUsingExcel function not working when loading to table having unique constraints

Hi, I am using the LoadCustomTableUsingExcel function to load an Excel file to an application table. The function seems to be working fine in most cases. However, I am having issue with tables havi...
  • DanielWillis's avatar
    8 months ago

    Hi Andrea,

    I don't know much about this function as I haven't used it (here are some other .net native functions to load Excel files that I have used)

    Regardless, I think the simplest option might be to load your data to a staging table and then insert/update/merge the rows from there to your main table. The MERGE sql statement sounds like it would be your friend here. This would allow you to maintain your constraints and not have to change your existing process significantly (just a different target table for the LoadCustomTableUsingExcel and an SQL statement execution.

    - Daniel