2 Replies Latest reply on Jun 12, 2012 6:42 AM by Franz

    problems on selecting views with french characters into column names

      Hi All,

      I have views with column names such as "Détermination Planimétriq" or "Année de construction:*";

      I can get in my c# function this columns names from ALL_VIEWS dictionary table, but if I try to make a selectionby use of an OracleCommand, Oracle returns an "Invalid identifier" error:

      SELECT "Détermination Planimétriq" FROM mytable;

      System.Data.OracleClient.OracleException (0x80131938): ORA-00904: "Determination Planimetriq": invalid identifier at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) at ...

      Any suggestion?...
        • 1. Re: problems on selecting views with french characters into column names
          Be wary of using character codes outside the Western European "simple" alphanumeric [A-Z0-9] for object names, i.e. columns, table names, function and procedure names, and so on.

          First reason, there is a 30 character limit for most object names, and characters that have to be spelled out with unicode characters take more space, i.e.:
          select dump( 'Détermination Planimétriq'  ) from dual;
          Typ=96 Len=29: 68,239,[ ... ]
          Although the varchar string for that column name looks like 25 characters, it needs room for 29 to store the e<acute> character. And could also depend on the client settings. Using case sensitive names is not a best practice, its better to avoid specifying objects with the double quotes.