3 Replies Latest reply: May 23, 2012 11:21 PM by ShankarViji RSS

    Got ORA-00932

    T0t0shka
      Hi.

      When execute perl script I've got following error:


      DBD::Oracle::db prepare failed: ORA-00932: inconsistent datatypes: expected NUMBER got BLOB (DBD ERR
      OR: error possibly near <*> indicator at char 48 in 'select IMAGE_DATA from IMAGES where regexp_like
      +(<*>IMAGE_DATA,'^\d{16}$')and rownum < = 10') [for Statement "select IMAGE_DATA from IMAGES where re+
      +gexp_like(IMAGE_DATA,'^\d{16}$')and rownum < = 10"] at Find_Analyze_PAN_PROX4.TXT line 77.+
      +Can't call method "execute" on an undefined value at Find_Analyze_PAN_PROX4.TXT line 78.+

      Why this is happen and how i could troubleshoot it?
        • 1. Re: Got ORA-00932
          850247
          Hi,

          You are trying to retrieve the data by giving the condition on BLOB Datatype using the Function "regexp_like". BLOB contains binary data. We cannot use this Function on this type of Columns.


          Moreover, we cannot retrieve the data of BLOB Columns using SELECT Statements. We have to use other GUI Environment for retrieving such Columns Data from the Table.



          Regards,
          Sailaja
          • 2. Re: Got ORA-00932
            T0t0shka
            I guess about it.
            • 3. Re: Got ORA-00932
              ShankarViji
              Hi T0t0shka ,

              We get this Error, because the data types are Incompatible.

              Use, Proper Conversion functions TO_NUMBER,TO_CHAR,TO_DATE to their appropriate data types.

              We Often get this error, if we have a Table with Data type LONG also.


              CREATE TABLE LONG_TABLE ( A LONG, B VARCHAR2(10) );



              When you Perform a SELECT as

              SELECT *
              FROM long_table
              WHERE b LIKE '%sj%';

              We wont get error.

              SELECT *
              FROM long_table
              WHERE a LIKE '%sj%';

              We get Inconsistent datatypes error.

              Thanks,
              Shankar