0

I'm having a problem with Oracle DB. I'm using python's cx_oracle. This is the error I'm getting while trying to execute a query:

cx_Oracle.DatabaseError: ORA-00904: "BUCKET_INTERNAL_ID": invalid identifier

I don't understang why I'm having this issue since that column name is not a reserver word or anything. I even tried the query on Oracle's SQL client and I'm still getting the same error.

This is the query:

select * from DL_ETA_CAPACITY where DATE_AGENDA = TO_DATE('2021-07-13','YYYY-MM-DD') and BUCKET_INTERNAL_ID = 7664 

(i tried "BUCKET_INTERNAL_ID" too, but got the same error)

This is the DLL of the table:

    CREATE TABLE "DL_ETA_CAPACITY" 
   (    "DATE_AGENDA" DATE, 
    "availability" FLOAT(126), 
    "bucket_external_id" VARCHAR2(100 BYTE), 
    "bucket_internal_id" NUMBER(*,0), 
    "total_capacity_min" NUMBER(*,0), 
    "total_capacity_amount" NUMBER(*,0), 
    "available_capacity_min" NUMBER(*,0), 
    "available_capacity_amount" NUMBER(*,0)
   )

Can anyone help? Am i doing something wrong?

NGabioud
  • 357
  • 3
  • 20
  • Never use quoted identifiers, because they are error prone, especially if you ever use letters that look like latin. I was able to understand all the pain when my colleague unintentionally put Cyrillic letter С instead of latin C (they both are on the same key on a keyboard and looks the same regardless of the case or font) – astentx Jul 13 '21 at 19:01

1 Answers1

2

Did you try to put it on lowercase?, sorry I couldn't comment