BIT_AND Function
This function performs bitwise logical "and" of the values in RAW r1 with RAW r2 and returns the "anded" result RAW. If r1 and r2 differ in length, then the "and" operation is terminated after the last byte of the shorter of the two RAWs, and the unprocessed portion of the longer RAW is appended to the partial result. The result length equals the longer of the two input RAWs. Syntax
UTL_RAW.BIT_AND (
   r1 IN RAW,
   r2 IN RAW) 
  RETURN RAW;看了以上内容明白了吗?它是一个函数,返回一个RAW,那要在定义部定义一个raw型的变量,然后再赋给它.

解决方案 »

  1.   

    我是在一个package的定义里见到的:CREATE OR REPLACE PACKAGE BODY EDM_PKGS IS
    -- Sub-Program Units
    FUNCTION GETBIT
     (rawField RAW,
      hexBit CHAR
     )
     RETURN CHAR
     IS
    BEGIN
      RETURN rawtohex(utl_raw.bit_and(rawField, hextoraw(hexBit)));
    END GetBit;
     ... ...运行的时候报上面的错误,有什么不对么
      

  2.   

    我执行下面的语句,函数创建成功了,估计是你的Oracle版本的问题。
    create or replace FUNCTION GETBIT
     (rawField RAW,
      hexBit CHAR
     )
     RETURN CHAR
     IS
    BEGIN
      RETURN rawtohex(utl_raw.bit_and(rawField, hextoraw(hexBit)));
    END GetBit;
      

  3.   

    是的,安装的时候有个支持模块没有装(类似于intermedia之类的那几项),又装了一次,可以啦
    :)