ORA-01747: invalid user.table.column, table.column, or column specification

前端 未结 11 2335
旧巷少年郎
旧巷少年郎 2021-01-04 01:27

Get the above error when the execute immediate is called in a loop

Update CustomersPriceGroups set  1AO00=:disc  Where cuno=:cuno
    Parameters:   disc=66 c         


        
相关标签:
11条回答
  • 2021-01-04 02:22

    The cause may also be when you group by a different set of columns than in select for example:

    select tab.a, tab.b, count(*)
    from ...
    where...
    group by tab.a, tab.c;
    
    0 讨论(0)
  • 2021-01-04 02:23

    ORA-01747: invalid user.table.column, table.column, or column specification

    You will get when you miss the column relation when you compare both column id your is will not be the same check both id in your database Here is the sample Example which I was facing:

    UPDATE TABLE_NAME SET APPROVED_BY='1000',CHECK_CONDITION=ID, WHERE CONSUMER_ID='200'
    

    here Issue you will get when 'CHECK_CONDITION' and 'ID' both column id will no same If both id will same this time your query will execute fine, Check id Id both Column you compare in your code.

    0 讨论(0)
  • 2021-01-04 02:28

    You used oracle keyword in your SQL statement

    0 讨论(0)
  • 2021-01-04 02:30

    For me, the issue was due to use to column name "CLUSTER" which is a reserved word in Oracle. I was trying to insert into the column. Renaming the column fixed my issue.

    insert into table (JOB_NAME, VERSION, CLUSTER, REPO, CREATE_TS) VALUES ('abc', 169, 'abc.war', '1.3', 'test.com', 'test', '26-Aug-19 04.27.09.000000949 PM')
    Error at Command Line : 1 Column : 83
    Error report -
    SQL Error: ORA-01747: invalid user.table.column, table.column, or column specification
    
    0 讨论(0)
  • 2021-01-04 02:32

    In addition to reasons cited in other answers here, you may also need to check that none of your table column names have a name which is considered a special/reserved word in oracle database.

    In my case I had a table column name uid. uid is a reserved word in oracle and therefore I was getting this error.

    Luckly, my table was a new table and I had no data in it. I was a able to use oracle DROP table command to delete the table and create a new one with a modified name for the problem column.

    I also had trouble with renaming the problem column as oracle wouldn't let me and kept throwing errors.

    0 讨论(0)
提交回复
热议问题