Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Convert CHAR to BLOB?
The error says it all. Below is one way you could use to get you on the
right track
Regards
Hex
SQL> SQL> SQL> CREATE OR REPLACE PROCEDURE fred(a IN BLOB) IS2 b BLOB;
Procedure created.
SQL> SQL> SQL> EXEC fred(UTL_RAW.CAST_TO_RAW('four'));Your blob contains 4 bytes
PL/SQL procedure successfully completed.
SQL> --8 bytes is the length of 'P_at_ssw0rd'
SQL> EXEC fred(EMPTY_BLOB());
Your blob contains 8 bytes
PL/SQL procedure successfully completed.
SQL>
SQL> SELECT *
2 FROM V$VERSION;
BANNER
SQL>
<raedwa01_at_gmail.com> wrote in message
news:1118077955.527937.65990_at_g44g2000cwa.googlegroups.com...
>I have a stored procedure that takes a blob as an input parameter. I
> check to see if the parameter is null by using CURSOR passCur IS
> SELECT NVL(PASSWORD, 'P_at_ssw0rd')
> FROM DUAL;
>
> PASSWORD is my Blob (it's a bytestream of a hashed password). If
> nothing is provided, i want to put the word P_at_ssw0rd into the field.
>
> I open the cursor and try to fetch the result into a temporary variable
> and always get this error.
> Error -932: ORA-00932: inconsistent datatypes: expected BLOB got CHAR
>
> Is there something i can do to make sure i put in a BLOB value?
>
> Thanks,
> Rob
>
Received on Mon Jun 06 2005 - 14:14:30 CDT