2 Replies Latest reply: Jun 12, 2012 1:42 AM by Franz RSS

    problems on selecting views with french characters into column names

    Franz
      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
          clcarter
          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;
          DUMP('D?TERMINATIONPLANIM?TRIQ')
          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.

          http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements008.htm#i27570