Skip to main content
May 4, 2023
Question

Import CSV to Database - Error executing SQL java.sql.SQLSyntaxErrorException: ORA-00904: "column_name": invalid identifier

  • May 4, 2023
  • 5 replies
  • 0 views

When trying to import data from CSV to Oracle DB, getting  Error executing SQL java.sql.SQLSyntaxErrorException: ORA-00904: "column_name": invalid identifier .

CSV File has headers and they are same as column names in DB table.

Has anyone encountered this issue?

Also noticed that the column names in sql statement are framed within " quotes like below

Caused by: Error : 904, Position : 49, Sql = select "column_name1", "column_name2", "clumn_name3", "column_name4" from "table_name" where 1=0 , OriginalSql = select "column_name1", "column_name2", "clumn_name3", "column_name4" from "table_name" where 1=0 , Error Msg = ORA-00904: "column_name4": invalid identifier

Note: Facing this issue only when file has headers in it.

    5 replies

    stefanhelzle0001
    May 4, 2023

    You can configure all the column names yourself in that node. Did you try that? Or do you use a different plugin?

    May 5, 2023

    With configuring column names and setting File has header to false is working fine. But as per requirement, file will contain headers and when trying with that facing above mentioned issue.

    stefanhelzle0001
    May 5, 2023

    I understand. Then you will need to discuss that requirement. I assume that the columns do not change. So I do not see any risk in ignoring them.