3 Replies Latest reply: Jan 28, 2013 11:05 PM by 971522 RSS

    QBE Error when query by String for Number column

    971522
      Hi,
      I have a table with Number column.
      The column structure is like below:
      <af:column>
      ....
      <af:inputText>
      ....
      <f:validator .../>
      <af:converNumber ..../>
      </af:inputtext>
      </af:column>

      QBE is enabled for this column.

      It works fine when query by Number value, such as '123'. But when I query by string like 'asd', it will return an error.

      Anyone met this problem?
        • 1. Re: QBE Error when query by String for Number column
          Arunkumar Ramamoorthy-Oracle
          Hi,

          Welcome to OTN. Always mention your JDev version and the clear usecase to explain your issue (refer this announcement : https://forums.oracle.com/forums/ann.jspa?annID=56).

          Why do you want to query a number column with a string value? Any specific reason why you don't use af:query?

          -Arun
          • 2. Re: QBE Error when query by String for Number column
            971522
            Hi Arun,

            I am using Jdev 11.1.1.7.0.

            In my case,
            I have a application table, from where user can create new row inline. Some fields in the row have type Long or Number. We are also using <af:converNumber ..../> inside <af:inputText> to do format.

            I do have a query panel above the table. But we want the user can also filter the records using QBE. Other columns are working fine, except the columns with type 'Number' or 'Long'.

            I checked the incident log, below are some useful information:
            Caused by: java.sql.SQLSyntaxErrorException: ORA-01722: invalid number
            Caused by: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT ... FROM ... WHERE ... AND ( ( (MeaRulesEO.DEFAULT_MEA_PERIOD = :vc_temp_1 ) ) )

            It seems 'MeaRulesEO.DEFAULT_MEA_PERIOD = :vc_temp_1' causes the error. Jdev assumes every input from QBE header as number. If String is entered, Jdev will return error.

            I also checked that if the table is read-only, this problem does not exist.

            Please help on this. Thank you.
            • 3. Re: QBE Error when query by String for Number column
              971522
              Anyone can help?