Home » SQL & PL/SQL » SQL & PL/SQL » RAW to number (oracle 11g )
RAW to number [message #596884] Fri, 27 September 2013 03:31 Go to next message
deepak416
Messages: 63
Registered: January 2013
Location: Pune
Member
can we convert RAW to number in sql.

because i have to bitand of one raw and number variable


[EDITED by LF: fixed topic title typo; was "ROW"]

[Updated on: Fri, 27 September 2013 14:34] by Moderator

Report message to a moderator

Re: ROW to number [message #596885 is a reply to message #596884] Fri, 27 September 2013 03:55 Go to previous messageGo to next message
dariyoosh
Messages: 538
Registered: March 2009
Location: France
Senior Member
Hi,

Maybe CAST_TO_NUMBER Function is what you're looking for.

Regards,
Dariyoosh
Re: ROW to number [message #596888 is a reply to message #596885] Fri, 27 September 2013 04:41 Go to previous messageGo to next message
deepak416
Messages: 63
Registered: January 2013
Location: Pune
Member
to_number('AA','xx');

what is the meaning of xx here and why xx are two
Re: ROW to number [message #596890 is a reply to message #596888] Fri, 27 September 2013 04:49 Go to previous message
dariyoosh
Messages: 538
Registered: March 2009
Location: France
Senior Member
Did you have a look at the link that I provided?

Quote:
to_number('AA','xx');

Try to convert a raw type to number in this way in SQL*Plus and post the result that you get here.

http://docs.oracle.com/cd/E11882_01/server.112/e41084/functions211.htm#sthref1688
Quote:

TO_NUMBER(expr [, fmt [, 'nlsparam' ] ])

TO_NUMBER converts expr to a value of NUMBER data type. The expr can be a BINARY_DOUBLE value or a value of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 data type containing a number in the format specified by the optional format model fmt.

Therefore to_number is not what you're looking for.

Quote:
what is the meaning of xx here and why xx are two

Why don't you check the documentation (Number Format Elements)?

Regards,
Dariyoosh

[Updated on: Fri, 27 September 2013 04:51]

Report message to a moderator

Previous Topic: ORA-29540
Next Topic: Getting Expecting External Language Error When Compiling Package
Goto Forum:
  


Current Time: Tue Apr 23 16:55:40 CDT 2024