DataTable With Oracle 11g - Error ORA-00972: identifier is too long

DataTable With Oracle 11g - Error ORA-00972: identifier is too long

Ali AdnanAli Adnan Posts: 47Questions: 18Answers: 1

Dear DataTable Team,
First of all I like to say this tool is really awesome, I want to purchase so that I am trying it, during my testing I am getting subject error, its happened when I use more than one table and join. with single table its work perfectly with out any problem.

After debugging I suspect that the SQL statement prepared by DataTable is like

SELECT tablename.columnname as "tablename.columnname" from tablename;

Oracle Support up to 30 characters for column aliases. and in my case when DataTable combines "tablename.columnname" it exceed 30 characters.

I tried to give table name an alias by

var response = new Editor(db, "mytablename as C") but still it is not working

Same error can be reproduce by altering Table USERS.FIRST_NAME to USERS.FIRST_NAME_OF_THE_EMPLOYEE
and change the Model "JoinModel"

public string first_name { get; set; } // to

public string first_name_of_the_employee { get; set; }

Please advice.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin
    Answer ✓

    Hi,

    The way the Editor libraries work are to read the fields into a dictionary where the key exactly matches the requested field name (tablename.columnname). This is done so that each data point can be looked up for each column without any issues regarding the format that the database returns.

    Unfortunately this means that the Oracle 30 character limit is hit quite easily. It looks like Oracle 12.2 supports up to 128 characters which will help, although I haven't got a copy of 12.2 to test with.

    Other than the prospect of using 12.2 there currently isn't a workaround for this in the provided PHP and .NET libraries I'm afraid, although it is something I will continue to look into.

    Regards,
    Allan

  • Ali AdnanAli Adnan Posts: 47Questions: 18Answers: 1

    Dear Allan,
    I installed Oracle 12c Latest Version but still I am getting same error, it seems still in 12c
    Oracle 30 character limit still exists.

    Can we have any workaround ? as I want to use this awesome tool with Oracle.

  • colinmacolinma Posts: 2Questions: 0Answers: 0

    Hi,
    I was wondering if anyone had came up with a workaround for this use case?
    Unfortunately we are using Oracle 12.1!
    Regards,
    Colin

  • zajczajc Posts: 67Questions: 10Answers: 2

    I think there is no workaround. Only if you shorten table and column names. That's what I did.

  • colinmacolinma Posts: 2Questions: 0Answers: 0

    Thanks zajc, reply much appreciated.

This discussion has been closed.